CVE-2021-21696
jenkins: Agent-to-controller access control allowed writing to sensitive directory used by Pipeline: Shared Groovy Libraries Plugin
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, Bitnami. Rated lower by GHSA (high), Red Hat (high).
Description
Jenkins 2.318 and earlier, LTS 2.303.2 and earlier does not limit agent read/write access to the libs/ directory inside build directories when using the FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| bitnami::Bitnami Vulnerability Database | jenkins | 2.318.1 |
| maven::GitHub Security Advisory Maven | org.jenkins-ci.main:jenkins-core | 2.303.3, 2.319 |
References
- http://www.openwall.com/lists/oss-security/2021/11/04/3
- https://access.redhat.com/security/cve/CVE-2021-21696
- https://github.com/jenkinsci/jenkins
- https://github.com/jenkinsci/jenkins/commit/93451e20c20cfd84badeb0f37c38d4c0c7a5dad3
- https://nvd.nist.gov/vuln/detail/CVE-2021-21696
- https://www.cve.org/CVERecord?id=CVE-2021-21696
- https://www.jenkins.io/security/advisory/2021-11-04/#SECURITY-2423