-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CVE-2022-45688 in org.json/json - misleading CPE #5401
Comments
Maven Coordinates <dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220924</version>
</dependency> Suppression rule: <suppress base="true">
<notes><![CDATA[
FP per issue #5401
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.json/json@.*$</packageUrl>
<cpe>cpe:/a:hutool:hutool</cpe>
</suppress> Link to test results: https://github.com/jeremylong/DependencyCheck/actions/runs/4053045385 |
Maven Coordinates <dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220924</version>
</dependency> Suppression rule: <suppress base="true">
<notes><![CDATA[
FP per issue #5401
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.json/json@.*$</packageUrl>
<cpe>cpe:/a:hutool:hutool</cpe>
</suppress> Link to test results: https://github.com/jeremylong/DependencyCheck/actions/runs/4053043241 |
Its also finding it for HazelCast. hazelcast-5.1.3.jar/META-INF/maven/org.json/json/pom.xml (pkg:maven/org.json/json@20220320) : CVE-2022-45688 |
I think this CVE does apply to |
Its strange the CVE doesn't mention anything about org.json though? |
It seems the CPE is misleading on the NIST site; another CPE should be added that refers to the org.json/json package. According to stleary/JSON-java#708, this seems to be a REAL positive. |
Maven Coordinates <dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220924</version>
</dependency> Suppression rule: <suppress base="true">
<notes><![CDATA[
FP per issue #5401
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.json/json@.*$</packageUrl>
<cpe>cpe:/a:hutool:hutool</cpe>
</suppress> Link to test results: https://github.com/jeremylong/DependencyCheck/actions/runs/4056298267 |
Agreed it needs its own CVE but Hazlecast still looks like a false positive. |
It seems to me that Hazelcast bundles the org.json/json package (having relocated it as com.hazelcast.org.json package), so I think it is a real issue there. |
OK you are right I think a lot of projects shade the JSON jar so this will be pretty pervasive. Yikes! |
Yeah, PrimeFaces shades it as well. At first I had been wondering too why it shows PrimeFaces, but then I remembered that it does shade it.
|
Yep |
How did you determine it is doing that? I'm asking because I also see various Google packages mentioned in my project:
Funny thing is, if you follow those links to the Sonatype site, it tells you there's no known vulnerability! I'm deeply confused by the report output, to be honest. For instance, the evidence for google-http-client-gson is:
So the highest ones like vendor having "google" in the name or com.google.http-client in the groupid (for pkg:maven/com.google.http-client/google-http-client-gson@1.42.2 (Confidence:High)) IMHO do not match the corresponding CVE's cpe, which is cpe:2.3:a:json-java_project:json-java:::::::: versions up to (excluding) 20220924 How can I be sure it's a false positive (or not), if I am unable to figure out what causes the match to be made? |
@sjamaan : First of all, make sure you use the latest (8.1.1) version of the dependency check - many false positives were eliminated there |
Many thanks, that did the trick indeed! Was this due to a bug, or am I somehow still misunderstanding the matching process? |
@sjamaan : From my experience, the pattern matching heuristics is a bit prone to err on the safe side, marking packages suspected to be affected even when they are actually not. The more serious over-eagerness (a.k.a. false positive) cases are handled by adding exceptions/suppressions inside the checker tool (like the change between versions 8.1.0 -> 8.1.1) |
I get that, but how can you tell specifically why the package matched against a CVE? I thought the "evidence" was for that, but if that's the case I couldn't figure out how the confidence is derived. |
I think this is a question for @jeremylong - I am not familiar with the internals of the tool. |
Package URl
pkg:maven/org.json/json@20220924
CPE
cpe:2.3:a:hutool:hutool:5.8.10:*:*:*:*:*:*:*
CVE
CVE-2022-45688
ODC Integration
{"label"=>"Maven Plugin"}
ODC Version
8.0.2
Description
The cpe on the NIST site:
cpe:2.3:a:hutool:hutool:5.8.10:*:*:*:*:*:*:*
does not seem related to org.json/jsonThe text was updated successfully, but these errors were encountered: