Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Issue wrongly set up at NIST #1019

Closed
gamma opened this issue May 13, 2020 · 10 comments
Closed

Security Issue wrongly set up at NIST #1019

gamma opened this issue May 13, 2020 · 10 comments

Comments

@gamma
Copy link

gamma commented May 13, 2020

Hi,

we received a security alert originating from GHSA-gw55-jm4h-x339 linking to https://nvd.nist.gov/vuln/detail/CVE-2020-11050

Our OWASP dependency checker wrongly matched the javax.websocket:javax.websocket-api against this vulnerability with a high confidence in several fields of the MANIFEST.

Can you please check the reported Metadata to make sure it does match only the affected client side library and not the javax.websocket-api

@marci4
Copy link
Collaborator

marci4 commented May 13, 2020

Öhm idk what happened there. Trying to get in contact with github for that one.

Best regards,
Marcel

@marci4
Copy link
Collaborator

marci4 commented May 13, 2020

Could you provide some contact for your OWASP dependency checker? Maybe they can help us solve this issue as well?

Thx a lot
Best regards
Marcel

@gamma
Copy link
Author

gamma commented May 13, 2020

We're using the Gradle dependency checker by https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/index.html

AFAIK they're loading updated XMLs from https://nvd.nist.gov/

@marci4
Copy link
Collaborator

marci4 commented May 13, 2020

I see reports for a lot of false positives in their issue database.

@gamma
Copy link
Author

gamma commented May 13, 2020

Thanks for checking.

@marci4
Copy link
Collaborator

marci4 commented May 13, 2020

If I understand it correctly, this false positive is caused by jeremylong/DependencyCheck#1827

@uap-universe
Copy link

uap-universe commented May 13, 2020

The maven plugin org.owasp:dependency-check-maven is also affected.

Strange thing is, that the cpe ID is clearly java_websocket and not javax.websocket. So I think there is some weak pattern matching going on in these checkers and they report matches even if the package names are just similar to some degree but not equal. But this is just blindly guessing from my side.

UPDATE

This is what the report shows. Clearly the vulnerability ID and the package do not match exactly just closely. So I assume that can only be fixed on the checker's side.

Dependency Vulnerability IDs Package Highest Severity CVE Count Confidence Evidence Count
javax.websocket-api-1.1.jar cpe:2.3:a:java-websocket_project:java-websocket:1.1:*:*:*:*:*:*:* pkg:maven/javax.websocket/[email protected] HIGH 1 Highest 29

@marci4
Copy link
Collaborator

marci4 commented May 13, 2020

Thats what my investigation showed.

I think there is an issue in the org.owasp match algorithm

@uap-universe
Copy link

uap-universe commented May 14, 2020

I did not read through all the details, but it seems that the checker uses some sort of Lucene index and some sort of fuzzy search. As per the documentation, false positives as well as false negatives are expected. So I suspect the canon solution to this is to add a suppression file that looks somewhat like this:

<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
    <suppress>
        <notes><![CDATA[False positive TooTallNate/Java-WebSocket / javax.websocket]]></notes>
        <packageUrl regex="true">^pkg:maven/jakarta\.websocket/jakarta\.websocket\-(api|client-api|all)@.*$</packageUrl>
        <cpe>cpe:/a:java-websocket_project:java-websocket</cpe>
    </suppress>
    <suppress>
        <notes><![CDATA[False positive TooTallNate/Java-WebSocket / javax.websocket]]></notes>
        <packageUrl regex="true">^pkg:maven/javax\.websocket/javax\.websocket\-(api|client-api|all)@.*$</packageUrl>
        <cpe>cpe:/a:java-websocket_project:java-websocket</cpe>
    </suppress>
</suppressions>

That has to be done now by all projects using dependency check. It looks like there is nothing you can do as library author.

UPDATE
I modified the regular expressions so that they match all three artifacts in javax.websocket and jakarta.websocket group.

@marci4
Copy link
Collaborator

marci4 commented May 15, 2020

@universe thx a lot for your work!

Closing this issue as it is a false positive caused by the fuzzy search!

Will mention it in the advisory.

Best regards,
Marcel

@marci4 marci4 closed this as completed May 15, 2020
marco-schmidt added a commit to marco-schmidt/amweb that referenced this issue May 23, 2020
fix dependencyCheck false positive because unused other websocket api has issue CVE-2020-11050
TooTallNate/Java-WebSocket#1019 (comment)
GHSA-gw55-jm4h-x339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants