CVE-2020-15250Information disclosure in JUnit4
In JUnit4 from version 4.7 and before 4.13.1, the test rule TemporaryFolder contains a local information disclosure vulnerability. 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. This vulnerability impacts you if the JUnit tests write sensitive information, like API keys or passwords, into the temporary folder, and the JUnit tests execute in an environment where the OS has other untrusted users. 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. For Java 1.7 and higher users: this vulnerability is fixed in 4.13.1. For Java 1.6 and lower users: no patch is available, you must use the workaround below. 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. For more information, including an example of vulnerable code, see the referenced GitHub Security Advisory.
What to do
Fixed builds are available from Alpine, Debian, Maven, Ubuntu: see the table below for the fixed version per release.
Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | junit4 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | junit4 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | junit4 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | junit4 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | junit4 | Fixed | 4.12-8ubuntu0.20.04.1 | UBUNTU-CVE-2020-15250 |
| Ubuntu 18.04 | junit4 | Fixed | 4.12-8~18.04.1 | UBUNTU-CVE-2020-15250 |
| Ubuntu 16.04 | junit4 | Fixed | 4.12-4ubuntu1.1 | UBUNTU-CVE-2020-15250 |
| Ubuntu 14.04 | junit4 | Fix pending | UBUNTU-CVE-2020-15250 | |
| Debian 14 | junit4 | Fixed | 4.13.1-1 | DEBIAN-CVE-2020-15250 |
| Debian 13 | junit4 | Fixed | 4.13.1-1 | DEBIAN-CVE-2020-15250 |
| Debian 12 | junit4 | Fixed | 4.13.1-1 | DEBIAN-CVE-2020-15250 |
| Red Hat Enterprise Linux 8 | junit | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | junit-javadoc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | junit-manual | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | junit | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | junit-demo | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | junit-javadoc | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | junit-manual | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | junit4 | Not affected | ||
| Red Hat Enterprise Linux 6 | junit4-demo | Not affected | ||
| Red Hat Enterprise Linux 6 | junit4-javadoc | Not affected | ||
| Red Hat Enterprise Linux 6 | junit4-manual | Not affected | ||
| Alpine Linux 3.24 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.23 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.22 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.21 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.20 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.19 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.18 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.17 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.16 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.15 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.14 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Alpine Linux 3.13 | junit | Fixed | 4.13.1-r0 | ALPINE-CVE-2020-15250 |
| Maven library | junit:junit | Fixed | 4.13.1 | GHSA-269g-pwp5-87pp |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- junit-team junit4: affected: < 4.13.1
References
- https://github.com/junit-team/junit4/security/advisories/GHSA-269g-pwp5-87pp
- https://github.com/junit-team/junit4/commit/610155b8c22138329f0723eec22521627dbc52ae
- https://github.com/junit-team/junit4/blob/7852b90cfe1cea1e0cdaa19d490c83f0d8684b50/doc/ReleaseNotes4.13.1.md
- https://junit.org/junit4/javadoc/4.13/org/junit/rules/TemporaryFolder.html
- https://lists.apache.org/thread.html/r5f8841507576f595bb783ccec6a7cb285ea90d4e6f5043eae0e61a41%40%3Cdev.creadur.apache.org%3E
- https://lists.apache.org/thread.html/rbaec90e699bc7c7bd9a053f76707a36fda48b6d558f31dc79147dbf9%40%3Cdev.creadur.apache.org%3E
- https://lists.apache.org/thread.html/r717877028482c55acf604d7a0106af4ca05da4208c708fb157b53672%40%3Ccommits.creadur.apache.org%3E
- https://lists.apache.org/thread.html/rb2771949c676ca984e58a5cd5ca79c2634dee1945e0406e48e0f8457%40%3Cdev.creadur.apache.org%3E
- https://lists.apache.org/thread.html/rde385b8b53ed046600ef68dd6b4528dea7566aaddb02c3e702cc28bc%40%3Ccommits.creadur.apache.org%3E
- https://lists.apache.org/thread.html/rc49cf1547ef6cac1be4b3c92339b2cae0acacf5acaba13cfa429a872%40%3Cdev.creadur.apache.org%3E
- https://lists.apache.org/thread.html/r500517c23200fb2fdb0b82770a62dd6c88b3521cfb01cfd0c76e3f8b%40%3Cdev.creadur.apache.org%3E
- https://lists.apache.org/thread.html/r95f8ef60c4b3a5284b647bb3132cda08e6fadad888a66b84f49da0b0%40%3Ccommits.creadur.apache.org%3E
- https://github.com/junit-team/junit4/issues/1676
- https://lists.debian.org/debian-lts-announce/2020/11/msg00003.html
- https://lists.apache.org/thread.html/ra1bdb9efae84794e8ffa2f8474be8290ba57830eefe9714b95da714b%40%3Cdev.pdfbox.apache.org%3E
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.