CVE-2022-4065 json
cbeust testng XML File Parser JarFileUtils.java testngXmlExistsInJar path traversal
published 3y ago modified 4mo ago also EUVD-2022-7421 , GHSA-rc2q-x9mf-w3vf
- cvss
- 5.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.0%
- EPSS 1.0% chance of exploitation in 30 days, percentile 62%
- public exploits
- 0
- none known
Summary
A vulnerability was found in cbeust testng 7.5.0/7.6.0/7.6.1/7.7.0. It has been declared as critical. Affected by this vulnerability is the function testngXmlExistsInJar of the file testng-core/src/main/java/org/testng/JarFileUtils.java of the component XML File Parser. The manipulation leads to path traversal. The attack can be launched remotely. Upgrading to version 7.5.1 and 7.7.1 is able to address this issue. The patch is named 9150736cd2c123a6a3b60e6193630859f9f0422b. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-214027.
Patch / fix
- maven org.testng:testng 7.5.1, 7.7.0
- org.testng testng 7.5.1, 7.7.1
- testng_project testng 7.5.1, 7.7.1
- testng SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +12 more 7.10.1-150200.3.10.1
- mockito SLE Module for Package Hub 15 SP6, openSUSE Leap 15.6, openSUSE Leap 15.5 5.11.0-150200.3.7.1
- snakeyaml SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +13 more 2.2-150200.3.15.1
- testng SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 7.4.0-150200.3.7.1
suse advisories SUSE-SU-2024:2568-1SUSE-SU-2023:1690-1
- github.com/cbeust/testng@9150736 commit
- github.com/cbeust/testng#2806 pull request
- github.com/cbeust/testng#1596 pull request
- github.com/testng-team/testng#2899 pull request
- github.com/cbeust/testng/releases/tag/7.7.1 release
- github.com/cbeust/testng/releases/tag/7.7.0 release
- github.com/testng-team/testng/releases/tag/7.5.1 release
Is CVE-2022-4065 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-4065 updated cvss 7.0
testng: a path traversal in zip files
-
Red Hat Enterprise Linux 7 testng, testng-javadoc Red Hat Software Collections rh-maven36-testng, rh-maven36-testng-javadocaffected: no fix planned “Out of support scope”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.97% chance of exploitation in the next 30 days, higher than 62% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/cbeust/testng/pull/2806 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
| CNA | 3.0 | 5.5 | CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
| CNA | 2.0 | 6.5 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.testng:testng | >=6.13, <7.5.1 >=7.6.0, <7.7.0 |
7.5.1 7.7.0 |
Affected products
- cbeust testng
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/cbeust/testng/pull/2806
issue-tracking, web, exploit, patch, third-party-advisory
-
github.com
/cbeust/testng/commit/9150736cd2c123a6a3b60e6193630859f9f0422b
patch, web, third-party-advisory
-
github.com
/cbeust/testng/releases/tag/7.7.1
patch, web
-
github.com
/cbeust/testng/pull/1596
web
-
github.com
/testng-team/testng/pull/2899
web
-
vuldb.com
/?id.214027
vdb-entry, technical-description, web, third-party-advisory
-
vuldb.com
/?ctiid.214027
signature, permissions-required, web
-
nvd.nist.gov
/vuln/detail/CVE-2022-4065
advisory
-
github.com
/cbeust/testng
package
-
github.com
/cbeust/testng/releases/tag/7.7.0
web
-
github.com
/testng-team/testng/releases/tag/7.5.1
web
Sources
- CVE List CVE-2022-4065
- GitHub Advisory GHSA-rc2q-x9mf-w3vf
- NVD CVE-2022-4065
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added version information.