CVE-2023-40342 Jenkins Flaky Test Handler Plugin stored cross-site scripting vulnerability
Attackers can inject malicious scripts via JUnit reports in Jenkins Flaky Test Handler Plugin, potentially compromising user sessions.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-40342?
CVE-2023-40342 is a medium-severity cross-site scripting vulnerability in Jenkins Flaky Test Handler Plugin, published on 16 Aug 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2023-40342?
2 open source packages ship an affected version, including org.jenkins-ci.plugins:flaky-test-handler. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.jenkins-ci.plugins:flaky-test-handler Maven | All versions | 1.2.3 |
org.jenkins-ci.plugins:flaky-test-handler Maven | All versions | 1.2.3 |
Products include Jenkins Flaky Test Handler.
How do I fix CVE-2023-40342?
Upgrade org.jenkins-ci.plugins:flaky-test-handler to 1.2.3 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2023-40342 being exploited?
There is no known exploitation of CVE-2023-40342 in the wild and no public exploit code.
Other vulnerabilities in Jenkins Flaky Test Handler Plugin
Sources
Also known as GHSA-hv48-hgp6-xpqf.