
حزمة الكشف عن CVE-2026-79752 لـ CakePHP 5.2.13 ثغرة حقن SQL عبر FunctionsBuilder::cast، مع نص PoC بلغة Python ومختبر 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، تقبل الدوال FunctionsBuilder::cast وFunctionsBuilder::extract وFunctionsBuilder::datePart وFunctionsBuilder::dateAdd في الملف src/Database/FunctionsBuilder.php قيم 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 splices type as literalSQLite executes CAST(body AS ...)notes.body POCWitness79752 in HTTP bodyPOCWitness79752 في جسم HTTP 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 مقابل البناء المُرقَّع: يجب ألا يظهر الشاهد المُعيَّن.إذا لم تستطع التحديث فورًا
استهدف فقط http://127.0.0.1:8088 (أو عنوان loopback الذي ربطته). لا توجِّه هذا السكربت إلى الإنترنت.
python3 CVE-2026-79752-Abraxas-Labs.py
النجاح هو الشاهد أعلاه في جسم الاستجابة. استجابة 200 HTML عامة ليست كذلك.
حزمة loopback المستخدمة لإعادة الإنتاج. صور رسمية ما لم يبنِ Dockerfile في هذا المجلد من المصدر.
cd lab
docker compose up --force-recreate
اربط شجرة المنتج المتأثر بجانب Compose إذا كان ملف YAML يثبِّت دليلًا محليًا (ملف plugin المضغوط / وسم المصدر من جدول الإصدارات). لا تنشر شيئًا باستثناء 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. لا ضمان.