Suspected Vietnam-Linked Hackers Target Southeast Asia in South China Sea Espionage Campaign · 11h Vulnerability in GNU m4 software · 16h Vulnerability in SMSEagle RCDevs OpenOTP SMS integration connector software · 17h Fragnesia: When a Firewall Becomes the Target · 1d Vulnerability in Chainlit software · 1d Vulnerabilities in GNU Screen software · 1d Drupal Warns of New Highly Critical Site Takeover Vulnerability Under Active Exploitation · 1d Hackers Exploit 10 Vulnerabilities Across Mitel, Juniper, Vates, and Danfoss Products · 1d VMware VMSA-0011: When the Hypervisor Becomes the Attack Surface · 2d Vulnerabilities in PrestaHelp phsuperpack module for PrestaShop · 2d Suspected Vietnam-Linked Hackers Target Southeast Asia in South China Sea Espionage Campaign · 11h Vulnerability in GNU m4 software · 16h Vulnerability in SMSEagle RCDevs OpenOTP SMS integration connector software · 17h Fragnesia: When a Firewall Becomes the Target · 1d Vulnerability in Chainlit software · 1d Vulnerabilities in GNU Screen software · 1d Drupal Warns of New Highly Critical Site Takeover Vulnerability Under Active Exploitation · 1d Hackers Exploit 10 Vulnerabilities Across Mitel, Juniper, Vates, and Danfoss Products · 1d VMware VMSA-0011: When the Hypervisor Becomes the Attack Surface · 2d Vulnerabilities in PrestaHelp phsuperpack module for PrestaShop · 2d
🛡️
ACyber Sentinel 安全评估团队
← 返回
⚡ 情报报告

Cloudflare WAF 如何帮助防护 phpAfterShell 和其他关键 PHP 漏洞

在 2026 年 11 月 19 日,安全研究公司 depthfirst 公开了 phpAfterShell (CVE-2026-126714),这是一个 PHP 默认文件会话处理程序中的漏洞,可能导致远程代码执行。在通用漏洞评分系统 (CVSS) 4.0 下,该漏洞的评分为 9.2(严重)。PHP 项目在同一天修复了该漏洞,版本包括 8.2.36、8.3.37、8.4.28、8.5.13 和 8.6.0。这些版本还修复了其他 16 个安全漏洞,其中六个也被评为严重。Cloudflare 的 Web 应用防火墙 (WAF) 阻止已知的 phpAfterShell 攻击模式,包括对免费计划客户的保护。保护来自于我们在 2026 年 10 月首次部署的 PHP 远程代码执行规则,该规则针对 php2shell 漏洞。该规则在漏洞公开之前已经检测到部分 phpAfterShell 攻击模式,并且在 11 月 19 日我们更新了其检测逻辑以覆盖 phpAfterShell。该规则是 Cloudflare 免费管理规则集和 Cloudflare 管理规则集的一部分,默认启用,其默认操作为阻止。在同一 WAF 版本中,我们为付费计划的 Cloudflare 管理规则集添加了三条新规则:一条针对 PHP-FPM 中的请求走私漏洞 (CVE-2026-129289),以及两条针对 PHP 的 SOAP 扩展中的漏洞 (CVE-2026-15353 和 CVE-2026-129506),这些漏洞在同一版本中被 PHP 修复。这些规则默认启用,操作为记录,因为它们所寻找的请求模式也可能出现在合法流量中,默认阻止可能会干扰合法流量。客户可以在安全事件中查看匹配的请求,并在确认规则不影响合法流量后将操作更改为阻止。WAF 是一个额外的防御层,而不是补丁的替代品。几个关键漏洞依赖于服务器配置,或者可以通过 WAF 看不到的路径到达,唯一的完整修复是升级 PHP 并重启每个工作进程。我们的分析师继续监控攻击活动,并将在新技术和变体出现时更新规则。您可以在 WAF 更新日志中跟踪规则更改,并在专门的 Cloudflare Zero Wire 简报中关注漏洞的发展。

到目前为止,似乎没有迹象表明这些漏洞已被利用。截至 2026 年 11 月 19 日,17 个漏洞中没有一个被列入 CISA 的已知被利用漏洞目录,我们审查的来源也没有报告在野外的利用情况。

我们对 phpAfterShell 的了解

PHP 默认将会话数据存储在文件中。当应用程序调用 session_start() 时,PHP 读取会话文件并将其内容反序列化到 $_SESSION 数组中。当请求结束时,PHP 将更新后的会话写回同一文件。phpAfterShell 在写入被中断时被触发。会话文件可以包含新会话数据的开头,后面跟着旧会话数据的结尾。在下一个请求中,session_start() 反序列化这些混合内容。如果攻击者控制了旧数据,PHP 最终可能会反序列化攻击者选择的对象。

试图利用该漏洞的攻击者可能首先会寻找一种方法将受控数据放入会话中。PHP 的建议中提到两种方法:

会话上传进度,这是一个 PHP 特性,将有关正在进行的文件上传的信息写入会话。远程客户端可以利用它来塑造存储的数据。

存储大量用户控制字符串的会话。

根据 PHP 的说法,代码执行还需要在写入的有用点中断和应用程序中适当的反序列化小工具链。depthfirst 报告称,它通过在 PHP 原生类中链接第二个未公开的内存损坏漏洞而实现了代码执行,而没有应用程序小工具。我们审查的来源没有确定该第二个漏洞是否在 11 月 19 日的版本中修复。

depthfirst 表示它发现并报告了 phpAfterShell。CVE 记录将 Leo Lin 和 Asahi 列为报告者。

其他关键漏洞

同一版本修复了六个其他关键漏洞。每个漏洞需要特定的配置才能被利用:

CVE 组件 影响 条件

CVE-2026-129289 PHP-FPM 未经身份验证的攻击者可以将第二个 FastCGI 请求走私到 PHP-FPM,并以工作进程的身份运行 PHP 代码。 需要一个重用后端 FastCGI 连接的前端(nginx 启用 fastcgi_keep_conn,Apache mod_proxy_fcgi 启用 enablereuse=on,或 HAProxy),一个打开 php://input 而不读取到末尾的应用程序路径,以及一个现有的 PHP 脚本路径。

CVE-2026-115560 会话序列化器 通过会话序列化器之间的不匹配进行对象注入。首次在我们的 php2shell 简报中介绍,现在已修复。启用会话上传进度。PHP 扩大了范围:使用不同序列化器并共享会话存储的应用程序、池或命令行作业受到影响。

CVE-2026-129496 时区缓存 使用后释放,可能导致新工作进程崩溃并可能运行代码。PHP 在已知内存地址上演示了本地代码执行。 非线程安全的构建,其中启动诊断已写入 PHP 错误日志文件。

CVE-2026-129481 会话关闭 使用后释放,PHP 将其描述为 CVE-2026-109619 的不完整修复。未演示代码执行。 PHP 8.3 及更高版本。

CVE-2026-129474 致命错误回溯 使用后释放,发生在魔术方法回溯中。 PHP 8.5 及更高版本,致命错误回溯默认启用。设置 zend.exception_ignore_args=1(php.ini-production 默认值)会阻止演示的攻击。

CVE-2026-129182 致命错误回溯 使用后释放。未演示代码执行。 PHP 8.5,特定路径级设置,以及产生早期诊断的 Apache 每目录配置或前端。

谁受到影响

受影响的版本是 PHP 8.2 之前的 8.2.36,8.3 之前的 8.3.37,8.4 之前的 8.4.28,8.5 之前的 8.5.13,以及 8.6.0 版本候选。是否暴露于部署取决于每个漏洞的条件。

PHP 8.1 及更早版本已达到生命周期结束。 depthfirst s

相关漏洞

CVE-2026-15353 CVSS 6.3 MEDIUM Awaiting Analysis
CVE-2026-15353 - SOAP information disclosure through malformed array dimensions
SOAP information disclosure through malformed array dimensions. The SOAP extension reads an uninitialized array position when decoding an encoded array whose arraySize attribute is empty, whitespace-only or non-numeric, or when such dimensions come from a WSDL definition. Four bytes of unrelated heap data can then be used as an integer key in the decoded array. An unauthenticated remote client can trigger this with a crafted request to a SoapServer endpoint, and a malicious SOAP server with a response to SoapClient. Heap memory is disclosed only if the application returns or otherwise exposes the decoded array. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129506 CVSS 6.3 MEDIUM Awaiting Analysis
CVE-2026-129506 - SOAP use-after-free when processing DTD entity references
SOAP use-after-free when processing DTD entity references. The SOAP extension frees the document type definition (DTD) of a parsed XML document while attribute values can still refer to entities it owns, and can then read freed memory. Removing the DTD also bypasses the SOAP server's rejection of documents that contain one. An unauthenticated remote attacker who can send a crafted request to a SOAP endpoint, or who controls a WSDL or schema document loaded by the application, can crash the PHP process and cause denial of service. Memory disclosure and code execution have not been confirmed. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129496 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129496 - Timezone cache use-after-free can lead to remote code execution
Timezone cache use-after-free can lead to remote code execution. In non-thread-safe builds, a diagnostic written to a file-based error_log during module startup, for example for an invalid date.timezone value or a session configuration warning, causes the timezone cache to be allocated in startup memory that is freed while a reference to it is kept. A diagnostic raised early in the first request of a worker, such as the max_input_vars warning, then accesses the freed cache. On such a deployment an unauthenticated remote attacker can crash PHP-FPM, Apache mod_php or CGI workers with a crafted request. Arbitrary code execution may be possible and has been demonstrated with known memory addresses. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129481 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129481 - Use-after-free after interrupted session shutdown
Use-after-free after interrupted session shutdown. The session extension records the filename of the executing script when a session starts. If a fatal error occurs in an application callback while the session variables are destroyed at shutdown, such as stream_close() of a user-defined stream wrapper, the pointer is retained after the request memory is freed, and a later request handled by the same worker can free the stale string. An attacker who can trigger such a failing cleanup may crash the worker or corrupt memory; code execution has not been demonstrated. This requires the filename to be allocated in request memory, for example when the script is not cached by OPcache. This issue affects PHP versions 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129474 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129474 - Use-after-free in magic method backtraces can lead to remote code execution
Use-after-free in magic method backtraces can lead to remote code execution. When collecting the arguments of a method call handled by __call() or __callStatic() for a backtrace, PHP can read stale values that may refer to freed memory. If a fatal error such as exceeding memory_limit occurs while an application enters such a call, with fatal_error_backtraces enabled (the default) and zend.exception_ignore_args disabled, a remote attacker who controls enough request data to influence memory allocation may cause memory corruption, crash the PHP worker or, with knowledge of memory addresses, execute arbitrary code. php.ini-production enables zend.exception_ignore_args, which prevents this. This issue affects PHP versions 8.5.* before 8.5.13.
CVE-2026-129289 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129289 - PHP-FPM request smuggling through an unread HTTP request body
PHP-FPM request smuggling through an unread HTTP request body. PHP does not discard the unread part of an HTTP request body at request shutdown when the application has opened php://input without reading it to the end. When the front end reuses backend connections, which is not the default in nginx or Apache (for example nginx with fastcgi_keep_conn on, or Apache mod_proxy_fcgi with enablereuse=on), PHP-FPM can parse the leftover bytes as a new FastCGI request. An unauthenticated remote attacker can use a single crafted multipart/form-data request to forge a backend request with chosen parameters such as SCRIPT_FILENAME, REMOTE_ADDR and PHP_ADMIN_VALUE, which can lead to execution of attacker-controlled PHP code. With LSAPI, subsequent requests on the connection can be disrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129182 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129182 - Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown
Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown. A fatal error raised while modified INI settings are restored during request shutdown can repopulate the stored fatal error backtrace after the executor has been cleaned up. The request memory is then freed, and a diagnostic emitted before executor initialization in a later request handled by the same PHP-FPM or mod_php worker can access the stale backtrace. The shutdown error requires per-path configuration of max_memory_limit, or of zlib.output_compression together with output_handler (which .user.ini can also set). The early diagnostic requires Apache per-directory configuration or, for PHP-FPM, a PHP_VALUE or PHP_ADMIN_VALUE parameter sent by the front end. This can cause memory corruption and worker crashes, and may allow remote code execution. This issue affects PHP versions 8.5.* before 8.5.13.
CVE-2026-126714 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-126714 - Partially overwritten session files can lead to remote code execution
Partially overwritten session files can lead to remote code execution. The files session save handler, which is the default, writes updated session data into the existing session file without first clearing it. If a write is interrupted, the file can contain the beginning of the new session followed by the end of the old one, and bytes of an ordinary string can later be unserialized as objects. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-115560 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-115560 - Session serializer mismatch can lead to remote code execution
Session serializer mismatch can lead to remote code execution. Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-109619 CVSS 9.8 CRITICAL Analyzed
CVE-2026-109619 - PHP Stale Internal Request-State Vulnerability - [Actively Exploited]
PHP has various global state that temporarily points into request memory. In some scenarios, global state may not be correctly reset, or may be repopulated after being reset. The global state may then refer to request memory even after it has been freed. Subsequent requests may read or branch on this stale state before it is fully initialized. Multiple strategies can trigger this condition and produce remote code execution (RCE).
CVE-2026-109618 CVSS 9.8 CRITICAL Analyzed
CVE-2026-109618 - PHP Memory Corruption Vulnerability - [Actively Exploited]
PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. Some contexts may not properly account for this scenario and leave request memory in an uninitialized state before performing an allocation. The subsequent request cleanup procedure may read or branch on this memory. Multiple OOM strategies can consistently trigger this condition and lead to remote code execution (RCE).
CVE-2023-50387 CVSS 7.5 HIGH Modified
CVE-2023-50387 - BIND DNSSEC CPU Denial of Service Vulnerability
Certain DNSSEC aspects of the DNS protocol (in RFC 4033, 4034, 4035, 6840, and related RFCs) allow remote attackers to cause a denial of service (CPU consumption) via one or more DNSSEC responses, aka the "KeyTrap" issue. One of the concerns is that, when there is a zone with many DNSKEY and RRSIG records, the protocol specification implies that an algorithm must evaluate all combinations of DNSKEY and RRSIG records.