WaratekVRT Sign in

CVE-2022-4065 testng

Affected softwaretestng
Severity7.8 High CVSS 3.1 3 scores
Fixed in7.5.1, 7.7.0
WeaknessPath traversal (CWE-22)
Published19 Nov 2022
Updated17 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.

  • 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

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

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.

Waratek RASP Runtime protection for Java applications

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

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.

VersionScoreBandVectorAssignerType
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
PackageIntroducedFixedLast affected
org.testng:testng 6.13 7.5.1 unbounded
org.testng:testng 7.6.0 7.7.0 unbounded

Products and versions

2 products, 3 version entries
SourceVendorProductSchemeAffected versions
osv org.testng testng generic ≥ 6.13 and < 7.5.1 · ≥ 7.6.0 and < 7.7.0
nvd testng project testng generic any version

References

URLTags
https://github.com/cbeust/testng/commit/9150736cd2c123a6a3b60e6193630859f9f0422b commit
https://github.com/cbeust/testng/pull/1596 WEB
https://github.com/cbeust/testng/pull/2806 WEB
https://github.com/testng-team/testng/pull/2899 WEB
https://github.com/cbeust/testng PACKAGE
https://github.com/cbeust/testng/releases/tag/7.7.0 WEB
https://github.com/cbeust/testng/releases/tag/7.7.1 WEB
https://github.com/testng-team/testng/releases/tag/7.5.1 WEB
https://vuldb.com/?ctiid.214027 WEB
https://vuldb.com/?id.214027 WEB

Timeline

Published2022-11-19By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.