개요
이 취약점이 무엇인지
PHPUnit is a testing framework for PHP. A vulnerability has been discovered in versions prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52 involving unsafe deserialization of code coverage data in PHPT test execution. The vulnerability exists in the `cleanupForCoverage()` method, which deserializes code coverage files without validation, potentially allowing remote code execution if malicious `.coverage` files are present prior to the execution of the PHPT test. The vulnerability occurs when a `.coverage` file, which should not exist before test execution, is deserialized without the `allowed_classes` parameter restriction. An attacker with local file write access can place a malicious serialized object with a `__wakeup()` method into the file system, leading to arbitrary code execution during test runs with code coverage instrumentation enabled. This vulnerability requires local file write access to the location where PHPUnit stores or expects code coverage files for PHPT tests. This can occur through CI/CD pipeline attacks, the local development environment, and/or compromised dependencies. Rather than just silently sanitizing the input via `['allowed_classes' => false]`, the maintainer has chosen to make the anomalous state explicit by treating pre-existing `.coverage` files for PHPT tests as an error condition. Starting in versions in versions 12.5.8, 11.5.50, 10.5.62, 9.6.33, when a `.coverage` file is detected for a PHPT test prior to execution, PHPUnit will emit a clear error message identifying the anomalous state. Organizations can reduce the effective risk of this vulnerability through proper CI/CD configuration, including ephemeral runners, code review enforcement, branch protection, artifact isolation, and access control.
실제 악용 사례 · 아직 확인된 사례가 없어요
CISA의 KEV 카탈로그(실제 공격에 악용된 취약점 목록)에 아직 올라와 있지 않아요. 다만 ‘앞으로도 안전하다’는 뜻은 아니니 심각도와 EPSS를 함께 확인하세요.
패치 현황
어떤 버전이 위험하고, 몇 버전으로 올리면 되는지
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| debian_linuxdebian | 이 버전만 | 취약 | = | 11.0 | 벤더 공지 확인 | |
| phpunitphpunit_project | 최초 버전 | ≤ | 취약 | < | 8.5.52 | 8.5.52이상 |
| 9.0.0 | ≤ | 취약 | < | 9.6.33 | 9.6.33이상 | |
| 10.0.0 | ≤ | 취약 | < | 10.5.62 | 10.5.62이상 | |
| 11.0.0 | ≤ | 취약 | < | 11.5.50 | 11.5.50이상 | |
| 12.0.0 | ≤ | 취약 | < | 12.5.8 | 12.5.8이상 | |
NVD 분석 기준. 시작과 끝 사이 버전이 취약해요. ‘이 버전 이상으로’는 끝이 ‘<’로 적힌 경우에만 알 수 있어요.
할당 기관(CNA)이 적은 버전 5줄도 보기
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| phpunitsebastianbergmann | 이 버전만 | 취약 | = | < 8.5.52 | 벤더 공지 확인 | |
| 이 버전만 | 취약 | = | >= 9.0.0, < 9.6.33 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | >= 10.0.0, < 10.5.62 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | >= 11.0.0, < 11.5.50 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | >= 12.0.0, < 12.5.8 | 벤더 공지 확인 | ||
참고 링크
NVD에 등록된 외부 자료예요. 익스플로잇·벤더 공지·패치 순으로 먼저 보여줘요.