Cyber Resilience

CVE-2023-40342

Medium

Published: 16 August 2023

Published
16 August 2023
Modified
21 November 2024
KEV Added
Patch
CVSS Score v3.1 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS Score 0.0576 90.7th percentile
Risk Priority 14 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2023-40342 is a medium-severity Cross-site Scripting (CWE-79) vulnerability in Jenkins Flaky Test Handler. Its CVSS base score is 5.4 (Medium).

Operationally, ranked in the top 9.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

Deeper analysis

Jenkins Flaky Test Handler Plugin 1.2.2 and earlier contains a stored cross-site scripting vulnerability tracked as CVE-2023-40342. The plugin fails to escape JUnit test contents before rendering them in the Jenkins UI, allowing untrusted data from report files to execute as script in users' browsers. The issue is classified under CWE-79 with a CVSS 3.1 score of 5.4 reflecting network attack vector, low complexity, and limited impacts to confidentiality and integrity.

Attackers who can supply or modify JUnit report files processed by the plugin are able to inject persistent scripts that execute when other users view the test results. Successful exploitation requires a logged-in user to interact with the affected page and can result in actions such as credential theft or UI manipulation within the Jenkins instance.

The Jenkins security advisory for SECURITY-3223, published alongside the CVE on 2023-08-16, details the flaw and links to corresponding updates in the OpenWall oss-security list. The EPSS score remains flat at 0.0576 with no material increase after disclosure.

EU & UK References

Vulnerability details

Jenkins Flaky Test Handler Plugin 1.2.2 and earlier does not escape JUnit test contents when showing them on the Jenkins UI, resulting in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to control JUnit report file contents.

CWE(s)

Related Threats

No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.

Affected Assets

jenkins
flaky test handler
≤ 1.2.2

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-79

Penetration testing submits XSS payloads to web applications, detecting cross-site scripting flaws for subsequent remediation.

addresses: CWE-79

Validates web inputs to reject script-related content that could produce XSS.

addresses: CWE-79

Output validation against expected content can reject or sanitize script content in generated web pages, reducing XSS exploitability.

References