False positive: CVE-2024-1233, CVE-2023-6263, CVE-2024-5971, CVE-2024-7885 on jar file #8540
-
DescriptionWe have a custom container that include a jar file where it contains libraries of RedHat Jboss 7.4.19 e.g. When running the scan, we get reported of these CVEs: CVE-2024-1233, CVE-2023-6236, CVE-2024-5971, CVE-2024-7885 Note: jboss-client-7.4.19.jar file was included in one of a customed rpm. Desired BehaviorSince all these CVE has been already fixed from current and previous version of Red Hat JBoss EAP 7.4.x. Actual BehaviorIn a normal behavior, if we install Jboss EAP 7.4.19 packages via package manager rpm, yum,.... But in this case, libraries are in a JAR file.
It is good to able to pinpoint the issue in the Jar file. But, it seems to miss the backport context from the OS provider. Q1: Can you please confirm, if Trivy support backport verification when libraries are in a jar file, zip file? Q2: What is the suggestion to eliminate these false positive? Reproduction StepsThe above CVEs are related to different library.
But let's take one example as it is all related to the same issue.
According to RHSA CVE-2024-1233
Patch for this CVE is applied from version eap7-wildfly-elytron-1.15.23-2.Final_redhat_00001.1.el7eap.noarch.rpm
See with this link: https://access.redhat.com/errata/RHSA-2024:3559
=== NOTE: RedHat Jboss EAP is commercial product ====
1) Get the RPM and extract the content
eap7-wildfly-elytron-1.15.23-2.Final_redhat_00001.1.el7eap.noarch.rpm
2) Create a jar that include contents from step 1.
3) Create a custom package that include jar in step 2
4) Create an image that install custom rpm in step 3
5) Test Trivy TargetContainer Image ScannerVulnerability Output FormatJSON ModeStandalone Debug Output{
"VulnerabilityID": "CVE-2024-1233",
"PkgName": "org.wildfly.security:wildfly-elytron-realm-token",
"PkgPath": "<Custom_path>/jms/lib/jboss-client-7.4.19.jar",
"PkgIdentifier": {
"PURL": "pkg:maven/org.wildfly.security/[email protected]",
"UID": "65101cb8fbd00059"
},
"InstalledVersion": "1.15.23.Final-redhat-00001",
"Status": "affected",
"Layer": {
"DiffID": "sha256:05bb3852c53abd74aeffad15460b10da55b40340ed9fa27dbc3bf6a2f41339fa"
},
"SeveritySource": "ghsa",
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2024-1233",
"DataSource": {https://github.com/wildfly-security/wildfly-elytron
"ID": "ghsa",
"Name": "GitHub Security Advisory Maven",
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven"
},
"Title": "EAP: wildfly-elytron has a SSRF security issue",
"Description": "A flaw was found in` JwtValidator.resolvePublicKey` in JBoss EAP, where the validator checks jku and sends a HTTP request. During this process, no whitelisting or other filtering behavior is performed on the destination URL address, which may result in a server-side request forgery (SSRF) vulnerability.",
"Severity": "HIGH",
"CweIDs": [
"CWE-918"
],
},
"References": [
"https://access.redhat.com/errata/RHSA-2024:3559",
"https://access.redhat.com/errata/RHSA-2024:3560",
"https://access.redhat.com/errata/RHSA-2024:3561",
"https://access.redhat.com/errata/RHSA-2024:3563",
"https://access.redhat.com/errata/RHSA-2024:3580",
"https://access.redhat.com/errata/RHSA-2024:3581",
"https://access.redhat.com/errata/RHSA-2024:3583",
"https://access.redhat.com/security/cve/CVE-2024-1233",
"https://bugzilla.redhat.com/show_bug.cgi?id=2262849",
"https://github.com/advisories/GHSA-v4mm-q8fv-r2w5",
"https://github.com/wildfly-security/wildfly-elytron",
"https://github.com/wildfly/wildfly/commit/aa151a00d75d6dbc4a1bf1b68d58b9de3087bb62",
"https://github.com/wildfly/wildfly/pull/17812/commits/0c02350bc0d84287bed46e7c32f90b36e50d3523",
"https://issues.redhat.com/browse/WFLY-19226",
"https://nvd.nist.gov/vuln/detail/CVE-2024-1233",
"https://www.cve.org/CVERecord?id=CVE-2024-1233" Operating SystemRed Hat 8.7 VersionVersion: 0.59.1 Checklist
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @sekveaja If package contains But if jar file doesn't relate with rpm package - Trivy checks this file as regular jar file.
Trivy doesn't support that.
You can use one (or multiple) filtering options - https://trivy.dev/latest/docs/configuration/filtering/ |
Beta Was this translation helpful? Give feedback.
Hello @sekveaja
Thanks for your report!
If package contains
jar
file and installed fromrpm
- Trivy skips thisjar
file - https://trivy.dev/latest/docs/scanner/vulnerability/#handling-software-installed-via-os-packagesBut if jar file doesn't relate with rpm package - Trivy checks this file as regular jar file.
Trivy doesn't support that.
You can use one (or multiple) filtering options - https://trivy.dev/latest/docs/configuration/filtering/
I think that VEX will be good for you.