
CakePHP 5.2.13의 FunctionsBuilder::cast를 통한 SQL 인젝션에 대한 CVE-2026-79752 공개 패키지로, Python PoC 스크립트와 승인된 재현을 위한 Docker 랩을 포함합니다.
abraxaslabs.tech · github.com/abraxas · @abraxas_null · CVE-2026-79752
CakePHP 5.2.13 — cakephp
CakePHP는 PHP용 신속 개발 프레임워크입니다. 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 이전 버전에서 src/Database/FunctionsBuilder.php의 FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, FunctionsBuilder::dateAdd는 사용자가 제어하는 dataType, part 또는 unit 값을 받아들여 이를 이스케이프되지 않은 구조적 조각으로 생성된 SQL에 포함시킵니다. 신뢰할 수 없는 입력을 이러한 매개변수에 전달하는 애플리케이션은 데이터베이스 연결의 권한에 따라 기밀성, 무결성, 가용성에 영향을 미치는 SQL 인젝션을 허용할 수 있습니다. 이 문제는 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 버전에서 수정되었습니다.
| CVE | CVE-2026-79752 · CVE.org |
| CWE | CWE-89 |
| CVSS | 치명적: 9.2 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| 제품 | CakePHP |
| 영향받는 버전 | 5.2.x 5.2.13까지 (또한 4.5.x < 4.5.12, 4.6.x < 4.6.5, 5.1.x < 5.1.9, 5.3.x < 5.3.7) |
| 패치된 버전 | 5.2.14, 5.3.7, 5.1.9, 4.6.5, 4.5.12 |
| 인증 | 없음 (소스 맵 참조) |
| 라이선스 | GNU Affero GPL v3.0 |
| 랩 | 127.0.0.1 전용 · 벤더/클라이언트 공개 팩, 스캐너 아님 |
cast() $dataType이 싱크입니다. HTTP는 랩 앱에서 GET /?type=이며, WP 라우트가 아닙니다.
GET/?type=GET /?type=<injected SQL type>FunctionsBuilder::cast가 type을 리터럴로 삽입SQLite가 CAST(body AS ...) 실행notes.body POCWitness79752 in HTTP bodyHTTP 본문의 POCWitness79752 AND sql= 라인이 주입된 조각을 보여줌 (CAST(body AS TEXT)만이 아님).
먼저 이것을 하세요: CakePHP를 5.2.14 (또는 5.3.7 / 5.1.9 / 4.6.5 / 4.5.12)로 업데이트하세요. 권고: GHSA-vjqc-q4mp-2rvf.
업그레이드 후 확인
CVE-2026-79752-Abraxas-Labs.py를 다시 실행하세요: 매핑된 witness가 나타나지 않아야 합니다.즉시 업데이트할 수 없는 경우
오직 http://127.0.0.1:8088 (또는 바인딩한 루프백)만 대상으로 하세요. 이 스크립트를 인터넷으로 향하게 하지 마세요.
python3 CVE-2026-79752-Abraxas-Labs.py
성공은 응답 본문에 위의 witness가 있는 것입니다. 일반적인 200 HTML은 아닙니다.
재현에 사용된 루프백 스택. 이 폴더의 Dockerfile이 소스에서 빌드하지 않는 한 공식 이미지입니다.
cd lab
docker compose up --force-recreate
YAML이 로컬 디렉터리를 마운트하는 경우 (버전 표의 플러그인 zip / 소스 태그) 취약한 제품 트리를 Compose 옆에 바인딩하세요. 127.0.0.1 외에는 아무것도 게시하지 마세요.
github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0
github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e
github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676
github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d
github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45
github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf
github.com/CVEProject/cvelistV5/tree/main/cves/2026/79xxx/CVE-2026-79752.json
Abraxas Labs: abraxaslabs.tech · github.com/abraxas · @abraxas_null
# CVE-2026-79752 (structured records)
- input: `https://nvd.nist.gov/vuln/detail/CVE-2026-79752`
- CWE: CWE-89
- published: 2026-09-17T15:16:51.673
## NVD description
CakePHP is a rapid development framework for PHP. Prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7, FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, and FunctionsBuilder::dateAdd in src/Database/FunctionsBuilder.php accept user-controlled dataType, part, or unit values and incorporate them into generated SQL as unescaped structural fragments. An application that passes untrusted input to these parameters can permit SQL injection with confidentiality, integrity, and availability impact according to the database connection's privileges. This issue is fixed in versions 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7.
## MITRE description
CakePHP is a rapid development framework for PHP. Prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7, FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, and FunctionsBuilder::dateAdd in src/Database/FunctionsBuilder.php accept user-controlled dataType, part, or unit values and incorporate them into generated SQL as unescaped structural fragments. An application that passes untrusted input to these parameters can permit SQL injection with confidentiality, integrity, and availability impact according to the database connection's privileges. This issue is fixed in versions 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7.
## Affected
- cakephp cakephp < 4.5.12 affected, >= 4.6.0, < 4.6.5 affected, >= 5.0.0, < 5.1.9 affected, >= 5.2.0, < 5.2.14 affected, >= 5.3.0, < 5.3.7 affected
- OSV:
## References (JSON sources only)
- https://github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0
- https://github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e
- https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676
- https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d
- https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45
- https://github.com/cakephp/cakephp/pull/19520
- https://github.com/cakephp/cakephp/pull/19528
- https://github.com/cakephp/cakephp/releases/tag/4.5.12
- https://github.com/cakephp/cakephp/releases/tag/4.6.5
- https://github.com/cakephp/cakephp/releases/tag/5.1.9
- https://github.com/cakephp/cakephp/releases/tag/5.2.14
- https://github.com/cakephp/cakephp/releases/tag/5.3.7
- https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/79xxx/CVE-2026-79752.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-79752
- https://github.com/advisories/GHSA-vjqc-q4mp-2rvf
- https://github.com/cakephp/cakephp/releases/tag/5.1.8
## GitHub advisory
CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
### Impact
The `FunctionsBuilder::cast($field, $dataType)`, `extract($part, $expr)`, `datePart($part, $expr)`, `dateAdd($expr, $value, $unit)` methods are vulnerable to SQL injection if user controlled data is supplied to the ($dataType / $part / $unit) parameters.
### Patches
5.3.7, 5.2.14, 5.1.9, 4.6.5, 4.5.12 contain fixes
### Workarounds
Don't provide user controlled data to these functions/parameters.
## OSV
CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
CakePHP is a rapid development framework for PHP. Prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7, FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, and FunctionsBuilder::dateAdd in src/Database/FunctionsBuilder.php accept user-controlled dataType, part, or unit values and incorporate them into generated SQL as unescaped structural fragments. An application that passes untrusted input to these parameters can permit SQL injection with confidentiality, integrity, and availability impact according to the database connection's privileges. This issue is fixed i
이 공개 팩은 GNU Affero General Public License v3.0에 따라 라이선스가 부여됩니다. LICENSE를 참조하세요.
이 팩은 벤더, 사이트 소유자, 라이선스된 랩을 위한 것입니다. 스크립트는 127.0.0.1과 통신합니다. 소유하지 않은 시스템에 대해 사용하는 것은 Abraxas Labs에 의해 승인되지 않습니다. 보증 없음.