Hacker News 中文摘要

RSS订阅

React Server Components中的服务拒绝与源代码暴露问题 -- Denial of service and source code exposure in React Server Components

文章摘要

React团队披露了React Server Components中的两个新漏洞:高严重性的拒绝服务攻击(CVE-2025-55184)和中严重性的源代码泄露(CVE-2025-55183)。这些漏洞存在于上周发布的补丁中,虽不涉及远程代码执行,但仍建议立即升级。关键漏洞修复后常会暴露后续问题。

文章总结

React团队披露React Server Components新增两项安全漏洞

2025年12月11日,React团队发布安全公告,披露在React Server Components中发现两个新增漏洞。这些漏洞是在研究人员尝试利用上周关键漏洞补丁时发现的。

漏洞详情: 1. 拒绝服务攻击(高危,CVE-2025-55184,CVSS 7.5):恶意HTTP请求可导致服务器进程陷入无限循环,造成服务中断。 2. 源代码泄露(中危,CVE-2025-55184,CVSS 5.3):特定恶意请求可能暴露服务器函数的源代码,包括硬编码的敏感信息。

受影响版本: - react-server-dom-webpack/react-server-dom-parcel/react-server-dom-turbopack的19.0.0至19.2.1版本 - 相关框架包括Next.js、React Router、Waku等

修复方案: 已发布19.0.2/19.1.3/19.2.2版本修复补丁,团队建议立即升级。值得注意的是,上周发布的补丁仍存在漏洞,已更新的用户需再次升级。

特别说明: - 仅使用客户端React的应用不受影响 - 运行时环境变量(如process.env)不会泄露 - React Native用户需单独更新受影响包

时间线: 12月3日首次报告→12月11日完成修复并披露。团队感谢安全研究员Andrew MacPherson和RyotaK的贡献。

(注:原文中关于Log4Shell的类比说明、部分技术细节示例及完整时间节点等次要信息已酌情精简)

评论总结

以下是评论内容的总结:

  1. 对SPA设计理念的质疑

    • 认为SPA本应减少与服务器的复杂交互,但现在似乎偏离了这一初衷
    • 引用:"I remember when the point of an SPA was to not have all these elaborate conversations with the server"
    • 引用:"Just 'here's the whole app, now only ask me for raw data'"
  2. 安全漏洞的担忧

    • 用户对RCE漏洞修复范围表示困惑,不确定是否需要再次更新
    • 引用:"did the update from last week for the RCE bug also include fixes for these new CVEs"
    • 引用:"npm audit says theres no issues"
    • 批评CVE公告方式,认为应先说明影响范围和缓解措施
    • 引用:"Trying to justify the CVE before fully explaining the scope"
    • 引用:"It’s common for critical CVEs to uncover follow‑up vulnerabilities"
  3. React Server Components的批评

    • 认为RSC模糊了客户端/服务器端代码界限,增加了安全风险
    • 引用:"make it hard to look at a piece of JavaScript code and derive which parts run where"
    • 引用:"introduces another problem: DEEP serialization RPC mechanism"
    • 强烈反对前后端混合架构,认为会导致污染
    • 引用:"using a single JavaScript codebase... is like cooking food in your toilet"
    • 引用:"ties the frontend and the backend together in undesirable ways"
  4. 对Facebook影响的疑问

    • 关注这些漏洞对Facebook(最大的React应用)的影响
    • 引用:"what does these vulnerabilities mean for Facebook"
    • 引用:"Facebook's the biggest web app written in React"
  5. 相关技术经验分享

    • 分享Google类似技术的困难经验
    • 引用:"was a bit of a nightmare... required some very delicate dancing"
    • 引用:"I assume it's gotten better given time"
    • 有人提前预见了RSC的问题
    • 引用:"opened an issue just 3 weeks ago that says... it ties the frontend and the backend together"
    • 引用:"seems to me that this is wholly unnecessary and possibly will never be safe enough"
  6. 对React审查流程的质疑

    • 质疑React Server Components的审查是否充分
    • 引用:"Were there not enough eyes on React Server Components before the patches"