<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Astra Security</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <id>https://blog.astrasec.org/</id>
  <link href="https://blog.astrasec.org/" rel="alternate"/>
  <link href="https://blog.astrasec.org/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, Astra Security</rights>
  <subtitle>Security analysis, reproduced and explained</subtitle>
  <title>Astra Security</title>
  <updated>2025-03-25T10:00:00.000Z</updated>
  <entry>
    <author>
      <name>Astra Security</name>
    </author>
    <category term="CVE Reports" scheme="https://blog.astrasec.org/categories/cve/"/>
    <category term="Next.js" scheme="https://blog.astrasec.org/tags/next-js/"/>
    <category term="Authorization Bypass" scheme="https://blog.astrasec.org/tags/authorization-bypass/"/>
    <category term="Web Security" scheme="https://blog.astrasec.org/tags/web-security/"/>
    <content>
      <![CDATA[<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>CVE-2025-29927 影响部分使用 Next.js Middleware 执行鉴权的自托管应用。攻击者能够构造内部请求头，使框架误判 Middleware 已经执行，从而跳过相关逻辑。如果访问控制只存在于 Middleware 中，受保护路由可能被直接访问。</p><p>本报告聚焦防守侧判断：检查部署模式、确认是否把 Middleware 当作唯一授权边界，并尽快升级到官方修复版本。</p><h2 id="根因"><a href="#根因" class="headerlink" title="根因"></a>根因</h2><p>Next.js 使用内部请求头追踪 Middleware 递归调用。受影响版本没有在进入信任边界时充分隔离该内部状态，外部请求因此可以伪造框架本应自行维护的信息。</p><p>问题的关键不只是“一个可控请求头”，而是内部控制信号跨越了外部输入边界。应用层若把 Middleware 作为唯一授权点，后续路由就缺少第二道校验。</p><h2 id="影响判断"><a href="#影响判断" class="headerlink" title="影响判断"></a>影响判断</h2><p>风险通常需要同时满足以下条件：</p><ol><li>应用运行在受影响的 Next.js 版本上；</li><li>使用 Middleware 执行认证或授权；</li><li>目标路由本身没有重复校验权限；</li><li>部署链路没有移除相关内部请求头。</li></ol><p>仅使用静态导出，或由托管平台在边缘层消除该攻击面的场景，需要结合官方公告单独判断。</p><h2 id="缓解与修复"><a href="#缓解与修复" class="headerlink" title="缓解与修复"></a>缓解与修复</h2><ul><li>按官方安全公告升级到对应主版本的已修复版本。</li><li>无法立即升级时，在反向代理或负载均衡层移除外部传入的 <code>x-middleware-subrequest</code> 请求头。</li><li>把关键权限校验放到数据访问或业务处理层，不把 Middleware 作为唯一安全边界。</li><li>在升级后重新测试未认证访问、低权限访问和直接路由访问。</li></ul><h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><ul><li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw">Vercel &#x2F; Next.js 官方安全公告</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-29927">NVD: CVE-2025-29927</a></li></ul>]]>
    </content>
    <id>https://blog.astrasec.org/zh-cn/research/cve-2025-29927-nextjs/</id>
    <link href="https://blog.astrasec.org/zh-cn/research/cve-2025-29927-nextjs/"/>
    <published>2025-03-22T02:00:00.000Z</published>
    <summary>
      <![CDATA[<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>CVE-2025-29927 影响部分使用 Next.js Middleware 执行鉴权的自托管应用。攻击者能够构造内部请求头，使框架误判]]>
    </summary>
    <title>Next.js Middleware 授权绕过</title>
    <updated>2025-03-25T10:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Astra Security</name>
    </author>
    <category term="CVE Reports" scheme="https://blog.astrasec.org/categories/cve/"/>
    <category term="Next.js" scheme="https://blog.astrasec.org/tags/next-js/"/>
    <category term="Authorization Bypass" scheme="https://blog.astrasec.org/tags/authorization-bypass/"/>
    <category term="Web Security" scheme="https://blog.astrasec.org/tags/web-security/"/>
    <content>
      <![CDATA[<h2 id="Summary"><a href="#Summary" class="headerlink" title="Summary"></a>Summary</h2><p>CVE-2025-29927 affects some self-hosted applications that use Next.js Middleware for authorization. An attacker can craft an internal request header that makes the framework treat Middleware as already executed and skip the relevant logic. Protected routes may become directly accessible when access control exists only in Middleware.</p><p>This report focuses on defensive triage: identify the deployment model, determine whether Middleware is the only authorization boundary, and upgrade to an officially patched release.</p><h2 id="Root-cause"><a href="#Root-cause" class="headerlink" title="Root cause"></a>Root cause</h2><p>Next.js uses an internal request header to track recursive Middleware calls. Affected versions did not sufficiently isolate this internal state at the external trust boundary, allowing a client to supply information that should have been maintained exclusively by the framework.</p><p>The core issue is not merely a controllable header. An internal control signal crossed an untrusted input boundary. When an application relies on Middleware as its only authorization layer, downstream routes have no second check.</p><h2 id="Exposure-conditions"><a href="#Exposure-conditions" class="headerlink" title="Exposure conditions"></a>Exposure conditions</h2><p>Risk generally requires all of the following conditions:</p><ol><li>The application runs an affected Next.js version.</li><li>Middleware performs authentication or authorization.</li><li>The target route does not independently enforce permissions.</li><li>The deployment path does not remove the internal request header.</li></ol><p>Static exports and hosting platforms that mitigate the attack at the edge should be evaluated separately against the vendor advisory.</p><h2 id="Mitigation-and-remediation"><a href="#Mitigation-and-remediation" class="headerlink" title="Mitigation and remediation"></a>Mitigation and remediation</h2><ul><li>Upgrade to a patched release for the relevant Next.js major version.</li><li>If immediate patching is impossible, remove externally supplied <code>x-middleware-subrequest</code> headers at the reverse proxy or load balancer.</li><li>Enforce critical permissions again at the data-access or business-logic layer.</li><li>After upgrading, retest unauthenticated, low-privilege, and direct-route access.</li></ul><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw">Vercel &#x2F; Next.js security advisory</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-29927">NVD: CVE-2025-29927</a></li></ul>]]>
    </content>
    <id>https://blog.astrasec.org/research/cve-2025-29927-nextjs/</id>
    <link href="https://blog.astrasec.org/research/cve-2025-29927-nextjs/"/>
    <published>2025-03-22T02:00:00.000Z</published>
    <summary>
      <![CDATA[<h2 id="Summary"><a href="#Summary" class="headerlink" title="Summary"></a>Summary</h2><p>CVE-2025-29927 affects some self-hosted applicatio]]>
    </summary>
    <title>Next.js Middleware Authorization Bypass</title>
    <updated>2025-03-25T10:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Astra Security</name>
    </author>
    <category term="CVE Reports" scheme="https://blog.astrasec.org/categories/cve/"/>
    <category term="Supply Chain" scheme="https://blog.astrasec.org/tags/supply-chain/"/>
    <category term="Linux" scheme="https://blog.astrasec.org/tags/linux/"/>
    <category term="Backdoor" scheme="https://blog.astrasec.org/tags/backdoor/"/>
    <content>
      <![CDATA[<h2 id="Summary"><a href="#Summary" class="headerlink" title="Summary"></a>Summary</h2><p>CVE-2024-3094 was a supply-chain attack against the release process of an open-source project. Much of the malicious logic was delivered through release archives and their build process rather than appearing plainly in the public source tree. That difference made routine source review less likely to identify the behavior quickly.</p><p>The incident demonstrates that a version number, a source repository, and a final build artifact are not automatically equivalent trust objects.</p><h2 id="Affected-scope"><a href="#Affected-scope" class="headerlink" title="Affected scope"></a>Affected scope</h2><p>The primary affected releases were XZ Utils 5.6.0 and 5.6.1. Practical exposure depended on the distribution, build parameters, architecture, and service combination. Most stable Linux distributions did not formally ship these versions, while rolling releases, testing branches, and prerelease environments may have included them.</p><h2 id="Defensive-checks"><a href="#Defensive-checks" class="headerlink" title="Defensive checks"></a>Defensive checks</h2><ul><li>Use a software inventory to locate every XZ Utils 5.6.0 or 5.6.1 installation.</li><li>Check container images, build caches, and manually installed paths in addition to package-manager databases.</li><li>Revert to a version explicitly identified as safe by the relevant distribution and rebuild potentially contaminated images.</li><li>Compare distribution advisories to confirm package origin, signatures, and build timelines.</li></ul><h2 id="Long-term-lessons"><a href="#Long-term-lessons" class="headerlink" title="Long-term lessons"></a>Long-term lessons</h2><p>The lasting value of this incident is in build and release security. Reproducible builds, release-archive-to-source diffing, maintainer account security, and behavioral baselines for high-impact dependencies should all be part of supply-chain defense.</p><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li><a href="https://www.redhat.com/en/blog/urgent-security-alert-fedora-40-and-rawhide-users">Red Hat security alert for Fedora and Rawhide</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2024-3094">NVD: CVE-2024-3094</a></li></ul>]]>
    </content>
    <id>https://blog.astrasec.org/research/cve-2024-3094-xz-utils/</id>
    <link href="https://blog.astrasec.org/research/cve-2024-3094-xz-utils/"/>
    <published>2024-03-29T04:00:00.000Z</published>
    <summary>
      <![CDATA[<h2 id="Summary"><a href="#Summary" class="headerlink" title="Summary"></a>Summary</h2><p>CVE-2024-3094 was a supply-chain attack against th]]>
    </summary>
    <title>XZ Utils Supply-Chain Backdoor Review</title>
    <updated>2024-04-02T01:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Astra Security</name>
    </author>
    <category term="CVE Reports" scheme="https://blog.astrasec.org/categories/cve/"/>
    <category term="Supply Chain" scheme="https://blog.astrasec.org/tags/supply-chain/"/>
    <category term="Linux" scheme="https://blog.astrasec.org/tags/linux/"/>
    <category term="Backdoor" scheme="https://blog.astrasec.org/tags/backdoor/"/>
    <content>
      <![CDATA[<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>CVE-2024-3094 是一次针对开源项目发布流程的供应链攻击。恶意逻辑主要存在于发布归档及其构建流程中，而不是以直观形式出现在公开 Git 源码里；这让常规源码审查难以及时发现异常。</p><p>事件提醒我们：版本号、源码仓库和最终构建产物并不是天然等价的信任对象。</p><h2 id="影响范围"><a href="#影响范围" class="headerlink" title="影响范围"></a>影响范围</h2><p>核心受影响版本为 XZ Utils 5.6.0 和 5.6.1。实际风险与发行版、构建参数、体系结构及服务组合有关。多数稳定版 Linux 发行版没有正式发布这些版本，但滚动发行版、测试分支和部分预发布环境可能曾经包含它们。</p><h2 id="防守检查"><a href="#防守检查" class="headerlink" title="防守检查"></a>防守检查</h2><ul><li>建立软件物料清单，定位所有 XZ Utils 5.6.0&#x2F;5.6.1 实例。</li><li>不只检查包管理器数据库，也检查容器镜像、构建缓存和手工安装路径。</li><li>回退到发行版明确标记为安全的版本，并重新构建可能受污染的镜像。</li><li>比对发行版公告，确认包的来源、签名和构建时间线。</li></ul><h2 id="研究结论"><a href="#研究结论" class="headerlink" title="研究结论"></a>研究结论</h2><p>这起事件的长期价值在于构建与发布安全：可复现构建、发布归档与源码的差异审计、维护者账号保护，以及对高影响依赖的行为基线，都应成为供应链防御的一部分。</p><h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><ul><li><a href="https://www.redhat.com/en/blog/urgent-security-alert-fedora-41-and-rawhide-users">Red Hat: Urgent security alert for Fedora 41 and Rawhide users</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2024-3094">NVD: CVE-2024-3094</a></li></ul>]]>
    </content>
    <id>https://blog.astrasec.org/zh-cn/research/cve-2024-3094-xz-utils/</id>
    <link href="https://blog.astrasec.org/zh-cn/research/cve-2024-3094-xz-utils/"/>
    <published>2024-03-29T04:00:00.000Z</published>
    <summary>
      <![CDATA[<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>CVE-2024-3094 是一次针对开源项目发布流程的供应链攻击。恶意逻辑主要存在于发布归档及其构建流程中，而不是以直观形式出现在公开 G]]>
    </summary>
    <title>XZ Utils 供应链后门事件复盘</title>
    <updated>2024-04-02T01:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Astra Security</name>
    </author>
    <category term="CVE Reports" scheme="https://blog.astrasec.org/categories/cve/"/>
    <category term="Java" scheme="https://blog.astrasec.org/tags/java/"/>
    <category term="JNDI" scheme="https://blog.astrasec.org/tags/jndi/"/>
    <category term="Remote Code Execution" scheme="https://blog.astrasec.org/tags/remote-code-execution/"/>
    <content>
      <![CDATA[<h2 id="Summary"><a href="#Summary" class="headerlink" title="Summary"></a>Summary</h2><p>Log4Shell demonstrated that log data is still untrusted input. When an application passed attacker-controlled strings to an affected Log4j 2 release, message lookup behavior could initiate JNDI access and, under the necessary runtime conditions, lead to remote code execution.</p><h2 id="Why-cleanup-is-difficult"><a href="#Why-cleanup-is-difficult" class="headerlink" title="Why cleanup is difficult"></a>Why cleanup is difficult</h2><p>Log4j is frequently present as an indirect dependency in large Java applications, commercial products, device firmware, and legacy deployments. Searching only the application root for JAR files can miss nested archives, container layers, old images, offline nodes, and vendor-packaged components.</p><h2 id="Remediation-guidance"><a href="#Remediation-guidance" class="headerlink" title="Remediation guidance"></a>Remediation guidance</h2><ul><li>Begin with asset and dependency inventories rather than treating internet scanning as a substitute for internal discovery.</li><li>Install a vendor-supported safe version and verify the classpath that the application actually loads.</li><li>Remove old container images, build caches, and rollback packages so vulnerable releases cannot return to production.</li><li>Retain detection for unusual outbound DNS, LDAP, and RMI connections.</li><li>Turn component discovery into a continuous software supply-chain control instead of a one-time incident script.</li></ul><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li><a href="https://logging.apache.org/log4j/2.x/security.html">Apache Log4j security vulnerabilities</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2021-44228">NVD: CVE-2021-44228</a></li></ul>]]>
    </content>
    <id>https://blog.astrasec.org/research/cve-2021-44228-log4shell/</id>
    <link href="https://blog.astrasec.org/research/cve-2021-44228-log4shell/"/>
    <published>2021-12-10T00:00:00.000Z</published>
    <summary>
      <![CDATA[<h2 id="Summary"><a href="#Summary" class="headerlink" title="Summary"></a>Summary</h2><p>Log4Shell demonstrated that log data is still untr]]>
    </summary>
    <title>Log4Shell Attack Surface and Long-Term Remediation</title>
    <updated>2024-01-18T08:30:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Astra Security</name>
    </author>
    <category term="CVE Reports" scheme="https://blog.astrasec.org/categories/cve/"/>
    <category term="Java" scheme="https://blog.astrasec.org/tags/java/"/>
    <category term="JNDI" scheme="https://blog.astrasec.org/tags/jndi/"/>
    <category term="Remote Code Execution" scheme="https://blog.astrasec.org/tags/remote-code-execution/"/>
    <content>
      <![CDATA[<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>Log4Shell 展示了“日志数据也是不可信输入”。当应用把攻击者可控字符串交给受影响版本的 Log4j 2 处理时，消息查找机制可能触发 JNDI 访问；结合运行时条件，最终可造成远程代码执行。</p><h2 id="为什么难以一次清理"><a href="#为什么难以一次清理" class="headerlink" title="为什么难以一次清理"></a>为什么难以一次清理</h2><p>Log4j 经常作为间接依赖存在于大型 Java 应用、商业软件、设备固件和历史部署中。只搜索应用根目录的 JAR 文件容易漏掉嵌套归档、容器层、旧镜像、离线节点和供应商打包组件。</p><h2 id="治理建议"><a href="#治理建议" class="headerlink" title="治理建议"></a>治理建议</h2><ul><li>以资产清单和依赖关系为起点，不以公网扫描结果代替内部排查。</li><li>使用厂商支持的安全版本，并验证应用实际加载的类路径。</li><li>清理旧容器镜像、构建缓存和回滚包，避免漏洞版本重新进入生产。</li><li>对 DNS、LDAP&#x2F;RMI 等异常出站连接保留检测能力。</li><li>将组件识别方法沉淀为持续的软件供应链检查，而不是一次性应急脚本。</li></ul><h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><ul><li><a href="https://logging.apache.org/log4j/2.x/security.html">Apache Log4j Security Vulnerabilities</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2021-44228">NVD: CVE-2021-44228</a></li></ul>]]>
    </content>
    <id>https://blog.astrasec.org/zh-cn/research/cve-2021-44228-log4shell/</id>
    <link href="https://blog.astrasec.org/zh-cn/research/cve-2021-44228-log4shell/"/>
    <published>2021-12-10T00:00:00.000Z</published>
    <summary>
      <![CDATA[<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>Log4Shell 展示了“日志数据也是不可信输入”。当应用把攻击者可控字符串交给受影响版本的 Log4j 2 处理时，消息查找机制可能触发]]>
    </summary>
    <title>Log4Shell 攻击面与长期治理</title>
    <updated>2024-01-18T08:30:00.000Z</updated>
  </entry>
</feed>
