CVE-2022-34778 Cross-site Scripting in Jenkins TestNG Results Plugin

Medium 5.4 Published Updated

Attackers with job configuration or test result control can execute arbitrary scripts in victim browsers via unescaped test descriptions in the Jenkins TestNG Results Plugin.

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-2022-34778?

CVE-2022-34778 is a medium-severity cross-site scripting vulnerability in Jenkins TestNG Results Plugin, published on 30 Jun 2022. 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 TestNG Results Plugin 554.va4a552116332 and earlier renders the unescaped test descriptions and exception messages provided in test results if certain job-level options are set, resulting in a cross-site scripting (XSS) vulnerability exploitable by attackers able to configure jobs or control test results.

Weakness: CWE-79

Which versions are affected by CVE-2022-34778?

2 open source packages ship an affected version, including org.jenkins-ci.plugins:testng-plugin. It affects 1 product.

PackageAffectedFixed in
org.jenkins-ci.plugins:testng-plugin MavenAll versions555.va0d5f66521e3
org.jenkins-ci.plugins:testng-plugin MavenAll versions555.va0d5f66521e3

Products include Jenkins Testng Results.

How do I fix CVE-2022-34778?

Upgrade org.jenkins-ci.plugins:testng-plugin to 555.va0d5f66521e3 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-2022-34778 being exploited?

There is no known exploitation of CVE-2022-34778 in the wild and no public exploit code.

Sources

Also known as GHSA-8hv7-4vfc-w8pg.

Is CVE-2022-34778 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free