CVE-2017-1000502 Arbitrary shell command execution in Jenkins EC2 Plugin

High 8.8 Published Updated

Users with agent configuration permissions can execute arbitrary shell commands on the Jenkins master node by configuring EC2 agents.

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-2017-1000502?

CVE-2017-1000502 is a high-severity command injection vulnerability in n/a, published on 24 Jan 2018. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Users with permission to create or configure agents in Jenkins 1.37 and earlier could configure an EC2 agent to run arbitrary shell commands on the master node whenever the agent was supposed to be launched. Configuration of these agents now requires the 'Run Scripts' permission typically only granted to administrators.

Weakness: CWE-78

Which versions are affected by CVE-2017-1000502?

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

PackageAffectedFixed in
org.jenkins-ci.plugins:ec2 MavenAll versions1.38
org.jenkins-ci.plugins:ec2 MavenAll versions1.38

Products include Jenkins Ec2.

How do I fix CVE-2017-1000502?

Upgrade org.jenkins-ci.plugins:ec2 to 1.38 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2017-1000502 being exploited?

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

Sources

Also known as GHSA-wp79-cpv2-9g7m.

Is CVE-2017-1000502 in your software?

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

Check your SBOMs for free