VDB
Sign up
MEDIUM4.3

GHSA-2w2h-gwwj-fh3q

Jenkins Pipeline: Groovy Plugin vulnerable to unrestricted instantiation of types

Quick fix

GHSA-2w2h-gwwj-fh3q — io.jenkins.plugins:pipeline-groovy-lib: upgrade to the fixed version with the command below.

# pom.xml: bump <version>4331.4333</version> for io.jenkins.plugins:pipeline-groovy-lib

Details

Jenkins Pipeline: Groovy Plugin 4331.v9d06ed4658ff and earlier does not restrict the types that can be instantiated through the Pipeline Snippet Generator, instantiating any type with a constructor annotated with @DataBoundConstructor in response to a request.

This allows attackers to have Pipeline: Groovy Plugin instantiate types related to job or system configuration other than Pipeline steps.

Additionally, this HTTP endpoint can be accessed using the GET method and does not require POST requests, resulting in a cross-site request forgery (CSRF) vulnerability. This allows attackers to create a script approval request attributed to another user, impersonating a trusted user when social engineering an administrator into approving a malicious script.

This vulnerability has been reported through the Jenkins Bug Bounty Program sponsored by the European Commission. Pipeline: Groovy Plugin 4331.4333.v50a_b_076c5199 only instantiates Pipeline steps and metastep delegates through the Snippet Generator, and requires POST requests for the affected HTTP endpoint.

Are you affected?

Enter the version of the package you're using.

Affected packages

Maven/io.jenkins.plugins:pipeline-groovy-lib
Introduced in: 0Fixed in: 4331.4333
Fix# pom.xml: bump <version>4331.4333</version> for io.jenkins.plugins:pipeline-groovy-lib

References