CVE-2022-25181 Jenkins Pipeline: Deprecated Groovy Libraries Plugin Protection Mechanism Failure

High 8.8 Published Updated

Attackers with configure permissions can execute arbitrary code on the Jenkins controller via crafted SCM contents if a global library exists.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-25181?

CVE-2022-25181 is a high-severity code injection vulnerability in Jenkins Pipeline: Shared Groovy Libraries Plugin, published on 15 Feb 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A sandbox bypass vulnerability in Jenkins Pipeline: Shared Groovy Libraries Plugin 552.vd9cc05b8a2e1 and earlier allows attackers with Item/Configure permission to execute arbitrary code in the context of the Jenkins controller JVM through crafted SCM contents, if a global Pipeline library already exists.

Which versions are affected by CVE-2022-25181?

2 open source packages ship an affected version, including org.jenkins-ci.plugins.workflow:workflow-cps-global-lib. It affects 1 product.

PackageAffectedFixed in
org.jenkins-ci.plugins.workflow:workflow-cps-global-lib MavenAll versions561.va_ce0de3c2d69
org.jenkins-ci.plugins.workflow:workflow-cps-global-lib MavenAll versions561.va_ce0de3c2d69

Products include Jenkins Pipeline\.

How do I fix CVE-2022-25181?

Upgrade org.jenkins-ci.plugins.workflow:workflow-cps-global-lib to 561.va_ce0de3c2d69 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2022-25181 being exploited?

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

Sources

Also known as GHSA-7w2w-fwpf-9m4h.

Is CVE-2022-25181 in your software?

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

Check your SBOMs for free