🔍 CVE-2020-8908

3.3
CVSS Score
LOW
2020-12-10
2026-11-02 18:18
✅ 완료

🇰🇷 한글 설명

Guava 모든 버전에는 임시 디렉터리 생성 취약점이 존재하며, 시스템에 접근 권한이 있는 공격자가 com.google.common.io.Files.createTempDir() API로 생성된 임시 디렉터리의 데이터에 접근할 수 있습니다. 유닉스 계열 시스템에서 기본적으로 생성된 디렉터리는 모든 사용자가 읽을 수 있으며, 해당 메서드는 30.0 이상 버전에서 @Deprecated 처리되었습니다.

💡 쉬운 설명

Guava 라이브러리가 만드는 임시 폴더를 같은 컴퓨터의 다른 사용자가 열어볼 수 있습니다. 민감한 임시 데이터가 노출될 수 있어 주의가 필요합니다.

🇺🇸 원문 (English)

A temp directory creation vulnerability exists in all versions of Guava, allowing an attacker with access to the machine to potentially access data in a temporary directory created by the Guava API com.google.common.io.Files.createTempDir(). By default, on unix-like systems, the created directory is world-readable (readable by an attacker with access to the system). The method in question has been marked @Deprecated in versions 30.0 and later and should not be used. For Android developers, we recommend choosing a temporary directory API provided by Android, such as context.getCacheDir(). For other Java developers, we recommend migrating to the Java 7 API java.nio.file.Files.createTempDirectory() which explicitly configures permissions of 700, or configuring the Java runtime's java.io.tmpdir system property to point to a location whose permissions are appropriately configured.

📍 영향받는 시스템

Guava 전체 버전 (특히 유닉스 계열 시스템에서 Files.createTempDir() 사용 시)

⚔️ 공격 벡터

시스템에 로컬 접근 권한을 가진 공격자가 world-readable 임시 디렉터리의 내용을 읽어 민감 데이터를 탈취

🛡️ 대응 방법

Files.createTempDir() 사용을 중단하고 java.nio.file.Files.createTempDirectory()(권한 700)로 마이그레이션하거나 Android는 context.getCacheDir() 사용

🔧 검증 코드

guava JAR 파일의 존재 여부와 버전을 확인하고 /tmp 권한이 world-readable(drwxrwxrwt)인지 확인하여, 버전이 30.0 미만이면 취약 가능성이 있다고 해석합니다.

Shell / Script
find $(dirname $(find / -name 'guava*.jar' 2>/dev/null | head -1)) -name 'guava*.jar' 2>/dev/null | head -5 && ls -l /tmp | head -5

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Microsoft Edge for Android