The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-15250

CVE-2020-15250: JUnit4 Information Disclosure Vulnerability

CVE-2020-15250 is an information disclosure vulnerability in JUnit4 affecting versions 4.7 to 4.13.0. The TemporaryFolder test rule exposes sensitive data to other users on Unix systems. This article covers technical details, affected versions, impact, and mitigation steps.

Published: March 11, 2026

CVE-2020-15250 Overview

CVE-2020-15250 is a local information disclosure vulnerability in JUnit4's TemporaryFolder test rule affecting versions 4.7 through 4.13.0. On Unix-like systems, the system's temporary directory (/tmp) is shared between all users. When JUnit tests use TemporaryFolder to create files and directories, these are created with default permissions that allow other users on the same system to read the contents. This vulnerability is particularly concerning in multi-tenant environments such as shared CI/CD systems, development servers, or containerized environments where test processes may write sensitive information to temporary storage.

Critical Impact

Sensitive information such as API keys, passwords, database credentials, or test data written by JUnit tests can be exposed to other users on shared Unix-like systems, potentially leading to credential theft or unauthorized access to downstream systems.

Affected Products

  • JUnit4 versions 4.7 through 4.13.0
  • Debian Linux 9.0
  • Apache Pluto (various versions)
  • Oracle Communications Cloud Native Core Policy 1.14.0

Discovery Timeline

  • 2020-10-12 - CVE-2020-15250 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-15250

Vulnerability Analysis

The vulnerability exists in the TemporaryFolder class, a JUnit test rule designed to create temporary files and directories that are automatically cleaned up after test execution. The root issue is that the implementation uses standard Java file creation methods that inherit the system's default umask settings, typically resulting in world-readable permissions (e.g., 644 for files, 755 for directories).

On multi-user Unix systems, this means any user with shell access can enumerate and read files created in /tmp by JUnit test processes. While the vulnerability does not allow modification or deletion of these files by unauthorized users, the confidentiality impact is significant when tests write sensitive data such as configuration files containing credentials, API tokens, or personally identifiable information.

The fix requires Java 1.7 or higher to leverage the java.nio.file APIs which support specifying POSIX file permissions at creation time. For users on Java 1.6 or earlier, no patch is available through JUnit itself.

Root Cause

The root cause is CWE-732 (Incorrect Permission Assignment for Critical Resource) combined with CWE-200 (Exposure of Sensitive Information). The TemporaryFolder implementation did not explicitly set restrictive file permissions when creating temporary files and directories, relying instead on system defaults which are typically permissive on Unix-like systems.

Attack Vector

This vulnerability requires local access to the target system. An attacker must be able to read the shared temporary directory (typically /tmp) on a Unix-like system where vulnerable JUnit tests are executing. The attack requires no privileges beyond basic shell access and user interaction is required only in the sense that the vulnerable tests must be running. The attack flow is:

  1. Attacker gains shell access to a shared system (CI/CD server, development machine, etc.)
  2. Attacker monitors the /tmp directory for newly created files from JUnit test processes
  3. Attacker reads files containing sensitive test data before cleanup occurs
  4. Sensitive credentials or data are extracted for further attacks
java
// Security patch from JUnit4 - Import additions for POSIX permission handling
// Source: https://github.com/junit-team/junit4/commit/610155b8c22138329f0723eec22521627dbc52ae
 
import java.io.File;
import java.io.IOException;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 
import org.junit.Rule;

Source: JUnit4 Security Patch Commit

The patch introduces reflection-based invocation of Java NIO APIs to set restrictive POSIX permissions on created files and directories, ensuring only the owning user can read the contents.

Detection Methods for CVE-2020-15250

Indicators of Compromise

  • World-readable files appearing in /tmp or system temporary directories with patterns matching JUnit temporary folder naming conventions
  • Process monitoring showing JUnit test executions writing to shared temporary directories with insecure permissions
  • Audit logs indicating non-authorized users accessing files in temporary directories created by test frameworks

Detection Strategies

  • Implement file permission auditing on shared systems to detect world-readable files in /tmp directories
  • Use dependency scanning tools to identify JUnit4 versions between 4.7 and 4.13.0 in project dependencies
  • Monitor CI/CD pipeline configurations for tests that may write sensitive data to temporary storage

Monitoring Recommendations

  • Enable audit logging for file access events in shared temporary directories on multi-user systems
  • Implement automated dependency vulnerability scanning in build pipelines to flag vulnerable JUnit versions
  • Review test code for patterns that write credentials, API keys, or sensitive configuration to TemporaryFolder resources

How to Mitigate CVE-2020-15250

Immediate Actions Required

  • Upgrade JUnit4 to version 4.13.1 or later for Java 1.7+ environments
  • Audit existing test code for sensitive data written to TemporaryFolder resources and remediate as needed
  • For Java 1.6 environments, implement the java.io.tmpdir workaround immediately
  • Review CI/CD and shared development environments for potential exposure

Patch Information

The vulnerability is fixed in JUnit4 version 4.13.1 for users running Java 1.7 or higher. The fix is documented in the JUnit 4.13.1 Release Notes and the security issue is tracked in GitHub Security Advisory GHSA-269g-pwp5-87pp. Oracle has also addressed this in downstream products via their April 2022 Security Alert.

Workarounds

  • For Java 1.6 users: Set the java.io.tmpdir system property to a directory exclusively owned by the executing user
  • Restrict permissions on the system temporary directory at the OS level where possible
  • Avoid writing sensitive data in JUnit tests; use mocked credentials or secure credential injection instead
  • Consider running tests in isolated containers or dedicated VMs to minimize exposure on shared systems
bash
# Workaround: Set a user-owned temporary directory for JUnit tests
# Create a secure temp directory with restrictive permissions
mkdir -p /home/$USER/secure_tmp
chmod 700 /home/$USER/secure_tmp

# Run tests with custom temp directory
java -Djava.io.tmpdir=/home/$USER/secure_tmp -jar junit-tests.jar

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechJunit

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-200

  • CWE-732
  • Technical References
  • JUnit 4.13.1 Release Notes

  • JUnit Issue #1676

  • GitHub Security Advisory GHSA-269g-pwp5-87pp

  • Apache Pulsar Commit Thread

  • Apache Pluto Dev Thread

  • Apache Knox Dev Thread

  • Apache Pluto SCM Thread

  • Apache Knox Dev Thread

  • Apache Creadur Commit Thread

  • Apache Creadur Dev Thread

  • Apache Creadur Dev Thread

  • Apache Knox Dev Thread

  • Apache Creadur Commit Thread

  • Apache Knox Dev Thread

  • Apache Knox Dev Thread

  • Apache Pluto Dev Thread

  • Apache Knox Dev Thread

  • Apache Creadur Commit Thread

  • Apache Knox Commits Thread

  • Apache PDFBox Dev Thread

  • Apache Pulsar Commit Thread

  • Apache Creadur Dev Thread

  • Apache Knox Dev Thread

  • Apache Turbine Commits Thread

  • Apache Creadur Dev Thread

  • Apache Creadur Dev Thread

  • Apache Pulsar Commit Thread

  • Apache Creadur Commit Thread

  • Apache Pulsar Commit Thread

  • Apache Pulsar Commit Thread

  • Apache Pulsar Commit Thread

  • Apache Pulsar Commit Thread

  • Apache Pulsar Commit Thread

  • Apache Knox Dev Thread

  • Apache Pulsar Commit Thread

  • Debian LTS Announcement Nov 2020
  • Vendor Resources
  • JUnit Commit 610155b

  • JUnit TemporaryFolder Javadoc

  • Oracle Security Alert April 2022
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English