🔍 CVE-2026-119193

0.0
CVSS Score
UNKNOWN
2026-10-29
2026-10-30 17:18
✅ 완료

🇰🇷 한글 설명

PHPUnit은 PHP용 테스트 프레임워크입니다. 13.4.0부터 13.4.4 이전 버전에서는 PHPT 코드 커버리지를 위한 임시 파일이 sys_get_temp_dir() 아래의 예측 가능한 phpunit-phpt 디렉터리에 생성되며, 해당 디렉터리의 소유권과 권한을 검증하지 않고 재사용합니다. 공유 임시 경로를 사용하는 다중 사용자 시스템에서 로컬 공격자가 개발자의 테스트 실행 전에 디렉터리를 미리 만들면, 자식 프로세스가 실행하기 전에 작업 파일을 교체하여 개발자 권한으로 임의 코드를 실행할 수 있습니다. 이 문제는 13.4.4에서 수정되었습니다.

💡 쉬운 설명

PHP 테스트 도구가 임시 폴더를 안전하지 않게 사용해서, 같은 컴퓨터의 다른 사용자가 파일을 몰래 바꿔치기할 수 있습니다. 그렇게 되면 테스트를 실행한 개발자의 권한으로 악성 코드가 실행될 수 있습니다.

🇺🇸 원문 (English)

PHPUnit is a testing framework for PHP. From 13.4.0 until 13.4.4, the TestCase::coverageFilesDirectory() logic in src/Runner/Phpt/TestCase.php creates temporary files for PHPT code coverage in a predictable phpunit-phpt directory under sys_get_temp_dir() and reuses that directory without verifying its ownership or permissions. On multi-user systems with a shared temporary path, a local attacker who creates the directory before the developer runs PHPT tests with code coverage can replace the generated job file before the child process executes it with require, allowing arbitrary code execution with the developer's privileges while the test and coverage report appear successful. PHPUnit 12.5 and earlier, default macOS and Windows configurations with per-user temporary directories, and single-user environments where another user cannot create files in the temporary path are not affected. This issue is fixed in 13.4.4.

📍 영향받는 시스템

PHPUnit 13.4.0 ~ 13.4.4 (공유 임시 디렉터리를 쓰는 다중 사용자 환경, PHPT 및 코드 커버리지 사용 시)

⚔️ 공격 벡터

로컬 공격자가 예측 가능한 phpunit-phpt 디렉터리를 미리 생성한 뒤 작업 파일을 악성 코드로 교체하여 개발자 테스트 실행 시 코드가 실행되도록 유도

🛡️ 대응 방법

PHPUnit을 13.4.4 이상으로 업그레이드하고, 공유 시스템에서는 사용자별 전용 임시 디렉터리(TMPDIR 등)를 사용

🔧 검증 코드

출력된 버전이 13.4.0~13.4.4 범위이면 취약하며, 13.4.4 이상이면 수정된 버전입니다 (결과가 없으면 프로젝트에 설치되지 않은 상태).

Shell / Script
composer show phpunit/phpunit 2>/dev/null | grep -E '^versions'

💻 영향받는 소프트웨어

PHP