Skip to content

Update dependency junit:junit to v4.13.1 [SECURITY]#1049

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/maven-junit-junit-vulnerability
Open

Update dependency junit:junit to v4.13.1 [SECURITY]#1049
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/maven-junit-junit-vulnerability

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate Bot commented May 12, 2026

This PR contains the following updates:

Package Change Age Confidence
junit:junit (source) 4.124.13.1 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


TemporaryFolder on unix-like systems does not limit access to created files

CVE-2020-15250 / GHSA-269g-pwp5-87pp

More information

Details

Vulnerability

The JUnit4 test rule TemporaryFolder contains a local information disclosure vulnerability.

Example of vulnerable code:

public static class HasTempFolder {
    @​Rule
    public TemporaryFolder folder = new TemporaryFolder();

    @​Test
    public void testUsingTempFolder() throws IOException {
        folder.getRoot(); // Previous file permissions: `drwxr-xr-x`; After fix:`drwx------`
        File createdFile= folder.newFile("myfile.txt"); // unchanged/irrelevant file permissions
        File createdFolder= folder.newFolder("subfolder"); // unchanged/irrelevant file permissions
        // ...
    }
}
Impact

On Unix like systems, the system's temporary directory is shared between all users on that system. Because of this, when files and directories are written into this directory they are, by default, readable by other users on that same system.

This vulnerability does not allow other users to overwrite the contents of these directories or files. This is purely an information disclosure vulnerability.

When analyzing the impact of this vulnerability, here are the important questions to ask:

  1. Do the JUnit tests write sensitive information, like API keys or passwords, into the temporary folder?
    • If yes, this vulnerability impacts you, but only if you also answer 'yes' to question 2.
    • If no, this vulnerability does not impact you.
  2. Do the JUnit tests ever execute in an environment where the OS has other untrusted users.
    This may apply in CI/CD environments but normally won't be 'yes' for personal developer machines.
    • If yes, and you answered 'yes' to question 1, this vulnerability impacts you.
    • If no, this vulnerability does not impact you.
Patches

Because certain JDK file system APIs were only added in JDK 1.7, this this fix is dependent upon the version of the JDK you are using.

  • Java 1.7 and higher users: this vulnerability is fixed in 4.13.1.
  • Java 1.6 and lower users: no patch is available, you must use the workaround below.
Workarounds

If you are unable to patch, or are stuck running on Java 1.6, specifying the java.io.tmpdir system environment variable to a directory that is exclusively owned by the executing user will fix this vulnerability.

References
Similar Vulnerabilities
For more information

If you have any questions or comments about this advisory, please pen an issue in junit-team/junit4.

Severity

  • CVSS Score: 4.4 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Configuration

📅 Schedule: (in timezone CET)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the security label May 12, 2026
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod Bot commented May 12, 2026

Renovate Jira issue ID: SLE-1495

@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha Bot commented May 12, 2026

Summary

⚠️ The PR description exceeded the analysis limit and was truncated. The review may not reflect all context.

Straightforward security patch: updates JUnit from 4.12 to 4.13.1 in a single pom.xml file to address CVE-2020-15250, a local information disclosure vulnerability in the TemporaryFolder test rule on Unix-like systems.

The change is minimal and mechanical — just one version bump in the test integration suite's dependency declaration. No code changes required.

What reviewers should know

Where to look:

  • Single file changed: its/projects/cayc/devoxx/pom.xml (JUnit version in test dependencies)

What to verify:

  • Check if there are other pom.xml files or dependency managers (gradle, maven parent POM, etc.) that also declare JUnit 4.12 and should be updated in sync
  • Confirm your Java version is 1.7 or higher (the fix relies on JDK APIs only available in Java 1.7+)

Context on the vulnerability:
The TemporaryFolder rule creates directories readable by all users on Unix systems. This is only a problem if:

  1. Tests write sensitive data (API keys, passwords) to temp folders, AND
  2. Tests run in environments with untrusted OS-level users (typical in CI/CD, less so in personal dev machines)

The author's description covers this well — use it to assess relevance to your use case.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

sonar-review-alpha[bot]

This comment was marked as outdated.

@renovate renovate Bot force-pushed the renovate/maven-junit-junit-vulnerability branch from 31edfda to 766d451 Compare May 15, 2026 14:08
Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

🗣️ Give feedback

@sonarqube-next
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants