Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 748402 (CVE-2020-15250) - <dev-java/junit-4.13.1: TemporaryFolder information disclosure vulnerability (CVE-2020-15250)
Summary: <dev-java/junit-4.13.1: TemporaryFolder information disclosure vulnerability ...
Status: IN_PROGRESS
Alias: CVE-2020-15250
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://github.com/junit-team/junit4/...
Whiteboard: B4 [glsa cve]
Keywords:
Depends on: 775638
Blocks:
  Show dependency tree
 
Reported: 2020-10-13 09:33 UTC by filip ambroz
Modified: 2021-07-29 17:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description filip ambroz 2020-10-13 09:33:56 UTC
In JUnit4 before version 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, 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.

Links:
------
https://junit.org/junit4/javadoc/4.13/org/junit/rules/TemporaryFolder.html
https://nvd.nist.gov/vuln/detail/CVE-2020-15250
https://osint.geekcq.com/2020/10/12/cve-2020-15250/

Patch:
------
https://github.com/junit-team/junit4/commit/610155b8c22138329f0723eec22521627dbc52ae
Comment 1 Miroslav Šulc gentoo-dev 2021-05-06 16:42:42 UTC
the tree is clean now, we have only version 4.13.2 from slot 4, so you can proceed.
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-05-13 13:48:25 UTC
Thanks!
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-07-25 02:12:18 UTC
GLSA request filed.
Comment 4 NATTkA bot gentoo-dev 2021-07-29 17:25:46 UTC
Package list is empty or all packages have requested keywords.