CVE-2026-27206: The Zumba Class Dance: 通过 PHP 对象注入在 json-serializer 中的 RCE

发布: (2026年2月21日 GMT+8 15:10)
2 分钟阅读
原文: Dev.to

Source: Dev.to

TL;DR

Zumba Json Serializer ≤ 3.2.2 盲目信任 JSON 输入中的 @type 字段,允许攻击者实例化任意 PHP 类。如果应用中存在 “gadget” 类,就会导致远程代码执行(RCE)。3.2.3 版的修复引入了白名单,但默认仍是 “全部允许” 以保持向后兼容,除非显式配置,否则更新后的应用仍然易受攻击。

Technical Details

  • Vulnerability ID: CVE‑2026‑27206
  • CWE ID: CWE‑502(PHP 对象注入)
  • CVSS Score: 8.1(高)
  • Attack Vector: 网络
  • Impact: 远程代码执行(RCE)
  • Exploit Status: 已提供概念验证(PoC)
  • Vulnerability Type: PHP 对象注入

Affected Systems

  • 使用 zumba/json-serializer 且满足 allowedClasses !== null && !in_array($className, $this->allowedClasses, true) 条件的 PHP 应用。

Exploit Details

Mitigation Strategies

  • 立即升级到 3.2.3 版本。
  • 使用 setAllowedClasses() 实现严格的类白名单。
  • 若不严格需要对象反序列化,改用原生 json_decode
  • 审计应用依赖,查找已知的 gadget 链(例如 PHPGGC)。

Remediation Steps

  1. 运行:

    composer require zumba/json-serializer:^3.2.3
  2. 在代码库中搜索所有 new JsonSerializer() 的实例化位置。

  3. 每次实例化后,添加:

    $serializer->setAllowedClasses([...]); // 允许的类列表
  4. 测试序列化流程,确保合法类不会被阻断。

References

0 浏览
Back to Blog

相关文章

阅读更多 »