🔍 CVE-2020-15250

4.4
CVSS Score
MEDIUM
2020-10-12
2026-10-07 21:17
✅ 완료

🇰🇷 한글 설명

JUnit4 4.7부터 4.13.1 미만 버전의 TemporaryFolder 규칙에서 로컬 정보 유출 취약점이 발견되었습니다. Unix 계열 시스템에서 임시 디렉토리가 모든 사용자와 공유되기 때문에, 테스트 중 생성된 파일이 다른 사용자에 의해 읽힐 수 있습니다. 이는 API 키나 비밀번호와 같은 민감한 정보가 포함된 경우 보안 위협이 됩니다.

💡 쉬운 설명

컴퓨터의 공용 임시 보관함에 중요한 비밀 정보를 적어두면, 같은 컴퓨터를 쓰는 다른 사람이 그 내용을 몰래 볼 수 있는 문제입니다. 테스트 과정에서 생성된 임시 파일이 보안 설정 없이 노출되는 것이 원인입니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

JUnit4 version 4.7 to 4.13.0

⚔️ 공격 벡터

동일한 시스템 내의 다른 사용자가 공유 임시 디렉토리에 접근하여 생성된 파일을 읽음

🛡️ 대응 방법

JUnit4를 4.13.1 이상 버전으로 업데이트하거나, java.io.tmpdir를 사용자 전용 디렉토리로 변경

🔧 검증 코드

출력된 JUnit 버전이 4.13.1 미만인지 확인하여 취약 여부를 판단합니다.

Shell / Script
mvn dependency:list | grep junit:junit

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N

💻 영향받는 소프트웨어

Git