CVE-2022-4065 testng
| Affected software | testng |
|---|---|
| Severity | 7.8 High CVSS 3.1 3 scores |
| Fixed in | 7.5.1, 7.7.0 |
| Weakness | Path traversal (CWE-22) |
| Published | 19 Nov 2022 |
| Updated | 17 Jun 2026 |
Description
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.
Exploitation status
No public exploit
No exploit has been reported in the sources we check. Published 3 years ago.
Exploitation status
- CISA KEV not listed
- VulnCheck KEV not listed
- CISA Vulnrichment no assessment published
- Indexed PoC none indexed
- EPSS 0.97% chance in 30 days
Waratek protection
Waratek has a rule that blocks attacks on this vulnerability.
- Protection full Path traversal
- Action available security rule
- Review automated Inferred
- Record active
| Decided by | A vulnerability class already blocked by an ARMR security rule |
|---|---|
| Finding | Protected by Waratek's ARMR path-traversal security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-22: Path Traversal. |
| Candidate fix | https://github.com/cbeust/testng/commit/9150736cd2c123a6a3b60e6193630859f9f0422b : a commit: the change itself |
How to mitigate CVE-2022-4065
Upgrade testng to a release that fixes it: 7.5.1 or 7.7.0. Until you can, Waratek RASP blocks exploitation with its path traversal rule. It runs inside the Java application, with no code changes.
CVSS
7.8 HIGH
v3.1 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3 metrics
CVSS
7.8 HIGH v3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3 metrics
We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.
| Version | Score | Band | Vector | Assigner | Type | |
|---|---|---|---|---|---|---|
| CVSS 3.1 | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
NVD | Primary | published |
| CVSS 3.1 | 5.5 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
cna@vuldb.com | Secondary | |
| CVSS 2.0 | 6.5 | none | AV:N/AC:L/Au:S/C:P/I:P/A:P |
cna@vuldb.com | Secondary |
Affected software and releases
Maven packages
Affected and fixed versions, from OSV.dev| Package | Introduced | Fixed | Last affected |
|---|---|---|---|
org.testng:testng |
6.13 | 7.5.1 |
unbounded |
org.testng:testng |
7.6.0 | 7.7.0 |
unbounded |
References
Timeline
Timeline
| Published | 2022-11-19 | By the CVE Program. |
|---|---|---|
| NVD record modified | 2026-06-17 | NVD's own last-modified date for this record. |