GHSA-hq87-h4jg-vxfw BIT-jenkins-2023-43498 CVE-2023-43498
Jenkins temporary uploaded file created with insecure permissions
- Severity
- 3.6 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.97%
- Chance of exploitation in the next 30 days. Higher than 61.73% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-377 Insecure Temporary File
- Fix
2.414.2- Upgrade org.jenkins-ci.main:jenkins-core to this version or later
Description
In Jenkins 2.423 and earlier, LTS 2.414.1 and earlier, uploaded files processed via the Stapler web framework and the Jenkins API MultipartFormDataParser create temporary files in the system temporary directory with the default permissions for newly created files.
If these permissions are overly permissive, attackers with access to the system temporary directory may be able to read and write the file before it is used.
This vulnerability only affects operating systems using a shared temporary directory for all users (typically Linux). Additionally, the default permissions for newly created files generally only allow attackers to read the temporary file, but not write to it. Jenkins 2.424, LTS 2.414.2 creates the temporary files in a subdirectory with more restrictive permissions.
As a workaround, you can change your default temporary-file directory using the Java system property java.io.tmpdir, if you’re concerned about this issue but unable to immediately update Jenkins.
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.jenkins-ci.main:jenkins-core | >= 2.50, < 2.414.2 |
2.414.2 |
| org.jenkins-ci.main:jenkins-core | >= 2.415, < 2.424 |
2.424 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.jenkins-ci.main:jenkins-core Maven → 2.414.2
- maven
<dependency><groupId>org.jenkins-ci.main</groupId><artifactId>jenkins-core</artifactId><version>2.414.2</version></dependency>- gradle
implementation("org.jenkins-ci.main:jenkins-core:2.414.2")
Severity breakdown
CVSS 3.1 3.6
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Weakness
CWE-377: Insecure Temporary File
Creating and using insecure temporary files can leave application and system data vulnerable to attack.
References
Advisories
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-6f9g-cxwr-q5jr Arbitrary file read vulnerability through the Jenkins CLI can lead to RCE | Critical Known exploited | Also affects org.jenkins-ci.main:jenkins-core |
| GHSA-8pqx-3rxx-f5pm Jenkins discloses project names via fingerprints | High Known exploited | Also affects org.jenkins-ci.main:jenkins-core |
| GHSA-26wc-3wqp-g3rp Deserialization of Untrusted Data in Jenkins | Critical Known exploited | Also affects org.jenkins-ci.main:jenkins-core |
| CVE-2018-1000861 Deserialization of Untrusted Data in Jenkins | Critical Known exploited | Also affects org.jenkins-ci.main:jenkins-core |
| GHSA-m6wv-wh8g-64xc Jenkins does not encrypt secrets from POST config.xml submissions before storing them in job configurations | Medium | Also affects org.jenkins-ci.main:jenkins-core |
| GHSA-93qh-vwrm-c5pw Jenkins: Stored XSS vulnerability in node offline cause description | Medium | Also affects org.jenkins-ci.main:jenkins-core |
| GHSA-92m7-4fpw-2wxm Jenkins: Open Redirect phishing attacks possible via "from" parameter in "Delegate to servlet container" | Medium | Also affects org.jenkins-ci.main:jenkins-core |
| GHSA-g28p-6mcc-v4rv Jenkins exposes other users' timezone and view names to users with Overall/Read permission | Medium | Also affects org.jenkins-ci.main:jenkins-core |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor