前几天 PHP 高危漏洞,整个互联网都兵荒马乱,连高市都被惊动了。
欧洲多国的政府网站在同一时间陆续下线,荷兰的数字身份系统与个人政务门户紧急关闭。日本各大平台相继挂出维护公告,连出去吃一顿寿司郎,顾客都被告知手机小程序因系统升级暂停服务。有内阁官员在深夜紧急发文,呼吁所有负责运维的人员今晚务必紧急应对,如果实在无法及时给网站打上补丁,哪怕临时拔掉网线停止运行,也是降低风险的必要手段。
这两个被安全社区称为 PHP2Shell 的漏洞,编号分别为 CVE-2026-109618 与 CVE-2026-109619,CVSS 评分为 9.2 分。在默认配置下,未经身份验证的外部请求可以通过特定参数触发底层异常,从而获取服务器的执行权限。
巧合的是,漏洞公开的前后几天,关于 AI 代码验证的技术讨论也十分活跃。
OpenAI 官方高调宣布,自家最新的前沿模型参与了关键漏洞的挖掘,将其列为安全计划的重大战果。而在开源社区和学术圈,Anthropic 刚刚放出的技术研究也引来无数赞叹,论文称 AI 已经可以为开源代码库生成能够通过独立检查器核验的形式化证明。在很多人的设想中,AI 正在以前所未有的速度消灭人类程序员写的失误,一个代码不会再有漏洞的新时代似乎触手可及。
然而,一边是硅谷实验室里被数学公式证明得无懈可击的理想代码,另一边却是现实世界里大批关键网站仓皇拔掉网线断网自保。
事实证明,即使应用层代码通过了严格的单元测试、静态分析甚至形式化证明,一旦承载代码运行的底层解释器存在缺陷,系统依然面临被直接攻破的风险。
漏洞挖掘复盘与 AI 的实际角色
在漏洞披露初期,部分技术宣传倾向于强调大语言模型在安全挖掘中的自动化表现。但在参与挖掘与复盘的安全研究人员公开技术细节后,整个过程展现出了更严谨的工程原貌。
最早发现漏洞并写出可用攻击验证的人,其实是独立安全研究员 Ryan Austin。早在八月初,他就已经在社交平台上发出了包含发现哈希的线索。在随后的复盘文章里,这位一线研究者特意强调,最初的发现并没有依赖什么特殊的工具框架,更没有使用普通人触碰不到的神奇模型。
真正决定漏洞被挖出来的,是对目标底层历史长达数十年的积累。研究员手中的线索,一路回溯到了 2004 年公开记录的内存限制缺陷,以及 2020 年一份未被充分重视的问题报告。这些历史记录构成了排查的主要方向。
AI 在这个过程中主要承担了加速验证的工作。在传统安全研究中,将一个理论上的内存缺陷转化为稳定可靠的验证脚本,通常需要研究人员耗费数周时间反复调试。借助大语言模型的辅助分析,这个验证周期被缩短到几天以内。
这种分工反映了当前技术的真实定位。研究的方向与直觉主要依赖人类对系统历史和代码上下文的理解,模型则显著提高了信息检索与代码验证的效率。
需要注意的是,随着利用验证门槛的降低,防守方面临的时间压力也相应增加。一旦漏洞补丁公开,逆向分析修复代码并提炼攻击特征的成本大幅下降,留给系统维护人员排查和升级的窗口期变得更加紧迫。
解释器内核缺陷与验证盲区
过去绝大多数关于网站被攻破的事故,问题出在上层应用的业务代码里。比如程序员少写了一道输入过滤,让黑客把恶意 SQL 语句传进了数据库;或者在处理上传时没有判断后缀,让人把木马文件存进了服务器。
而这次漏洞之所以引起广泛关注,原因在于其触发位置不在应用层的业务逻辑,而在 PHP 解释器的底层内核。
根据 W3Techs 的统计,在已知服务端开发语言的网站中,大约 69% 仍在使用 PHP 运行服务。在典型的部署架构中,Web 服务器接收请求后,通过 FastCGI 协议将数据交由 PHP-FPM 处理,底层由 C 语言实现的解释器负责内存分配、请求解析与代码执行。
这次的两个高危漏洞,直接深埋在 PHP 解释器内核的 C 语言实现中。换句话说,哪怕你的网站除了打印一行 Hello World 之外什么都没写,也一样逃不过被直接攻破的命运。
CVE-2026-109618 的成因与内存异常处理机制相关。当请求处理中遇到内存耗尽情况时,底层采用中断跳转(longjmp)的方式终止执行。如果该操作发生在部分内部数据尚未完全初始化的阶段,后续的内存清理例程会把未初始化的数据当作有效对象处理,为攻击者提供了执行特定指令的途径。CVE-2026-109619 则涉及变量作用域释放后的状态残留,上一次处理未清理干净的内存被后续请求复用,存在泄露数据甚至改变执行流程的隐患。
从请求处理路径来看,外部恶意载荷在 Web 服务器与 FastCGI 协议解析阶段就已经开始对解释器产生影响。由于缺陷发生在应用脚本被读取并执行之前,上层业务代码无论如何编写,都无法拦截底层运行时的状态异常。
形式化证明的工程边界
这正是为什么当下关于 AI 形式化证明的狂欢,在真实的运维现场显得格外尴尬。
Anthropic 在技术附录中探讨了使用大模型辅助生成证明的方法,展示了数学规格在排查逻辑边界上的严谨性。在 Hacker News 的技术讨论中,很多开发者赞赏了这种确定性验证带来的进步,但同时也聚焦于其在大型工程中的适用边界。
软件工程中的各类质量保障手段有着清晰的分工。
- 单元测试针对固定样例验证预期输出。
- 性质测试引入随机输入排查边界异常。
- 形式化证明利用数理逻辑推导函数是否满足规格定义。
这些验证手段关注的都是应用代码本身的逻辑一致性。在推导过程中,它们预设了一个理想的前提,即执行代码的硬件、操作系统、标准库以及语言解释器完全符合规范,不存在未预料的副作用。
但在生产环境中,这种理想状态并不存在。形式化证明可以确认一个支付扣减函数在算法层面不存在逻辑漏洞,却无法保证 PHP 解释器在分配内存时不会发生越界。应用层代码的正确推导,无法替代对底层运行环境的安全核验,这也是安全领域常提及的原则:证明通过不等于部署安全(Proof-checked is not deployment-verified)。
只要底层的 C 语言运行时存在裂缝,纯代码层面的证明通过,就绝不等于生产部署安全。把代码逻辑的无误误解为整个系统的固若金汤,是当下技术团队最大的盲区。
存量系统的长尾与补丁现实
面对这样高危的bug,最理所当然的呼吁往往只有两个字:升级。
然而,对于数以百万计真正支撑着业务运转的团队来说,说起来是简单,但实现却很难。
公开统计数据显示,现存的 PHP 站点中,大约 65% 运行在 PHP 8.x 分支。剩下的存量中,大约 27% 仍在使用 PHP 7.x,还有约 7% 运行在 PHP 5.x。这两类老旧版本早在数年前就已经结束了官方支持周期(EOL)。
官方针对本次漏洞发布的修复版本仅包含 8.2、8.3、8.4 和 8.5 四个活跃分支。这意味着全球大约三分之一的存量 PHP 站点无法直接获取官方推送的安全补丁。
对于维护这些系统的企业而言,直接跨主版本升级往往面临高昂的改造代价。旧项目通常依赖已被废弃的语法特性或陈旧的扩展组件,贸然升级解释器可能导致业务代码直接报错。在有限的时间内,推倒重写既不现实,也容易引入新的不可控风险。
在这个节骨眼上,劝这些企业推倒重来搞重构,或者寄希望于 AI 连夜把几十万行老旧代码无损改写,纯属天方夜谭。所以面对这种情况,工程上更可行的应对方式是在维持主版本兼容性的同时,为底层运行环境补充必要的回移植补丁。
建立运行时的确定性
处理类似的底层安全更新,需要将关注点从单一的代码测试,延伸到包含运行时、服务配置与进程状态的完整证据链。
在开发与多版本维护方面,像 ServBay 这样的本地开发集成环境在此次事件中就立了大功了。
针对本次漏洞,ServBay 除了第一时间同步 PHP 8.x 主流分支的修复包,还针对已经停止官方维护的旧版 PHP(包括 7.x 乃至 5.6 分支)提供了回移植的安全补丁支持。
这种做法为维护遗留系统的团队提供了一个务实的缓冲方案。开发者不需要承担重写代码的风险,可以在原有的大版本分支下更新已包含修复补丁的解释器包,消除底层运行时的安全隐患。
同时,配合按项目独立绑定 PHP 版本的机制,不同的站点可以根据自身依赖各自运行在对应的隔离环境中。新项目可以使用最新的 PHP 版本,老旧系统则固定在已打补丁的旧版本中,避免了全局环境互相干扰的问题。开发者在借助 AI 编写代码或运行测试的同时,底层基础设施能够提供版本明确、配置透明的运行时底座,让上层的逻辑验证与下层的环境安全各就其位。
总结
AI 技术在安全领域的应用,确实提升了漏洞发现、辅助分析与逻辑证明的效率。但工具的发展并没有改变基础软件工程的客观规律。
代码逻辑的自洽,始终建立在底层解释器稳定运行的基础之上。面对 CVE-2026-109618 这类发生在底层的严重缺陷,单纯依靠上层代码的测试或数学证明并不足以消除风险。正视验证手段的边界,结合受控、可复现的基础设施,及时为活跃版本与历史遗留系统应用安全补丁,才是保障服务稳定运行的扎实路径。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
PHP's high-risk loophole the other day, the entire Internet was in disarray and even the city was shaken.
At the same time, the Government web site in several European countries went offline, and the digital identity system in the Netherlands and the personal government portal were shut down. Large Japanese platforms have posted maintenance announcements and even gone out for a sushi sushi meal, and customers have been told that the mobile phone applet has been suspended due to system upgrades. Cabinet officials sent urgent messages late in the night calling on all personnel responsible for transportation to respond urgently this evening and, if it is not possible to patch the website in time, even if the grid is temporarily removed and shut down, it is a necessary means of reducing risks.
These two loopholes, known by the safe community as PHP2Shell, are classified as CVE-2026-109618 and CVE-2026-109619, respectively. Under the default configuration, an external request without authentication can trigger a bottom anomaly by a specific parameter, thus obtaining the server ' s execution of permission.
Coincidentally, a few days before and after the leak was made public, the technical discussion on AI code validation was also very active.
Officially, Open AI announced that its latest front-line model had been involved in the exhumation of key gaps as a major outcome of the security plan. And in open-source communities and academic circles, the technical research just released by Anthropic has led to numerous admirals, stating that AI can generate formalized certificates for the open-source library that can be verified by independent inspectors. In many scenarios, AI is destroying human programmers' mistakes at an unprecedented rate, and a new era of code no longer seems to be within reach.
On the one hand, however, the ideal code that has been shown to be impeccable by mathematical formulas in Silicon Valley laboratories, and on the other hand, a large number of key websites in the real world have been unplugged and self-protected.
Even though the application layer code has been subjected to rigorous unit testing, static analysis and even formalization, it has proved that the system is at risk of being directly breached once the bottom interpreter that runs the carrying code is defective.
The actual role of the loophole recovery and AI
In the early stages of leak disclosure, some technical advocacy tended to emphasize the automated performance of large language models in safe excavations. However, after the release of the technical details of the security researchers involved in the excavation and retrofitting exercise, the process was more rigorous.
The first person to discover a loophole and write a statement that could be validated by an attack was actually Ryan Austin, an independent security researcher. As early as August, he had sent a lead on social platforms containing the discovery of Hashi. In the post-referral article, the first-line researcher specifically emphasized that the initial discovery did not rely on any particular tool framework, much less on a magic model that ordinary people could not touch.
The real decision to dig the hole is the accumulation of decades of history at the bottom of the target. The researchers' leads go back to the memory limitations that were publicly recorded in 2004 and to a 2020 report on issues that were not given sufficient attention. These historical records form the main direction of the inventory.
AI undertook mainly the task of accelerating the validation process. In traditional safety studies, the translation of a theoretical memory defect into a stable and reliable validation script usually takes several weeks for researchers to debug. The validation cycle was shortened to a few days with the support of a large-language model.
This division of labour reflects the true positioning of current technologies. The direction and intuition of the study depend mainly on human understanding of the history of the system and the code context, while models significantly increase the efficiency of information retrieval and code validation.
It is important to note that as the threshold for the use of certification is lowered, the time pressure on defence increases accordingly. The window period left to system maintenance staff to screen and upgrade became more urgent once the gap patches were made public and the cost of reverse analysis of repair codes and refining attack features decreased significantly.
Interpret nuclear defects and verification blind zone
In the past, the vast majority of incidents involving website break-ups were in the business code used at the upper levels. For example, the programmer has reduced the number of input filters to allow hackers to upload malicious SQL statements into the database; or, while handling uploads, there are no post-judgement suffixes that allow the wooden horse files to be stored on the server.
This loophole is of wide concern because its trigger location is not the business logic of the application layer, but the bottom core of the PHP interpreter.
According to W3Techs, about 69% of the sites where the services are known to develop languages still use PHP operations. In a typical deployment structure, when the Web server receives the request, the data is sent to PHP-FPM through the FastCGI protocol, with the lower level being the interpreter achieved in the C language responsible for the memory allocation, request resolution and code execution.
Two high-risk holes this time, buried directly deep in the C language of the PHP interpreter core. In other words, even if you have nothing on your website except to print a line of Hello World, you can't escape the fate of being directly breached.
The cause of CVE-2026-109618 is related to memory anomaly mechanisms. When memory depletion is encountered in the processing of the request, the execution is terminated on the ground floor by an interruption jump (longjmp). If the operation takes place at a stage when some internal data are not fully initialized, subsequent memory clean-up routines will treat uninitialized data as valid objects and provide the aggressor with the means to implement specific instructions. CVE-2026-109619 deals with state residues after the release of the variable domain, the last disposal of uncleaned memory was reused by a follow-up request, and there was a risk of leaking data and even changing implementation processes.
From the requested path, the external malicious load has already started to affect the interpreter at the stage of the resolution of the Web server and the FastCGI protocol. Since the deficiencies occurred before the application script was read and implemented, the upper level of business code could not, in any event, be prepared to intercept the abnormal state at the bottom run.
Formalized engineering boundary
And that's why the current party about the formalization of AI is particularly embarrassing in the real world.
In its technical appendix, Anthropic explores the method of producing certificates using LLM as an aid, demonstrating the rigour of mathematical specifications at the logical boundary of clearance. During the technical discussions of Hacker News, many developers appreciated the progress made as a result of this certainty certification, but also focused on its applicable boundaries in large-scale engineering.
There is a clear division of labour among the various quality assurance tools in software engineering.
- Unit testing to verify the expected output for a fixed sample.
- The nature test introduced random input to screen border anomalies.
- Formatted proof that the mathematical logic extrapolating function meets the specification definition.
These certification instruments are concerned with the logical consistency of the application code itself. In the process of extrapolation, they pre-empt an ideal premise that the hardware, operating systems, standard libraries and language interpretors of the enforcement code are fully compliant with norms and do not have unintended side effects.
In the production environment, however, that ideal did not exist. Formalization proves that a payment deduction function does not have a logical loophole at the algorithm level, but does not guarantee that the PHP interpreter does not cross the border when distributing memory. The correct extrapolation of the application layer code cannot be a substitute for the safety verification of the bottom operating environment, a principle often mentioned in the field of safety: proof that it is not equivalent to deployment security.
As long as there are cracks in the lower C language, proof of a pure code level does not amount to production deployment security. Misreading the correct logic of the code as the solid gold soup of the system is the largest blind area of the current technical team.
Long tails and patches of stock systems
In the face of this high-risk bug, the most natural call is often only two words: escalation.
However, it is simple to say, but difficult to achieve, for the millions of teams that really support operations.
Public statistics show that about 65% of the existing PHP sites run in the PHP 8.x branch. Of the remaining stocks, about 27 per cent are still using PHP 7.x, and about 7 per cent are running PHP 5.x. These two old versions ended the official support cycle years ago.
The official version of the rehabilitation of this loophole publish contains only four active branches: 8.2, 8.3, 8.4 and 8.5. This means that about one third of the global stock of PHP sites does not have direct access to official safety patches.
For enterprises that maintain these systems, direct cross-cutting upgrades are often costly. Old projects often rely on obsolete syntax characteristics or old extension components, and a sudden upgrade of the interpreter may lead to direct error in the business code. Over a limited period of time, reverse rewrite is unrealistic and can easily introduce new and uncontrollable risks.
At this point in the day, they're being persuaded to re-construct, or they're hoping to change hundreds of thousands of lines of old code overnight at AI. Therefore, in the face of this situation, a more feasible engineering response would be to provide the necessary replant patches for the bottom operating environment while maintaining the compatibility of the main version.
Create certainty when running
Processing similar bottom security updates requires extending attention from a single code test to a complete chain of evidence that includes running time, service configuration and process state.
In terms of development and multi-version maintenance, local development integrated environments such as ServBay have done much in this event.
In response to this loophole, ServBay provided back-to-back patch support for old versions of PHP (including 7.x and 5.6 branches) that had ceased official maintenance, in addition to the first time synchronized repair packages of PHP 8.x mainstream branches.
This practice provides a practical buffer programme for the teams maintaining legacy systems. The developer does not have to take the risk of rewriting the code by updating the interpreter package that already contains repair patches under the old large version of the branch to remove the safety hazard at the bottom run.
At the same time, in conjunction with the mechanism for the independent binding of the PHP version by project, different sites can operate in the corresponding isolation environment depending on their own reliance. The new project can use the latest version of the PHP, while the old system is fixed in the old version of the patch that has been filled, avoiding the problem of global environmental interference. While developing codes or running tests using AI, the bottom infrastructure provides a clear version, with a transparent running time base, where the logical validation of the upper layer and the environmental security of the lower layer are positioned.
Summary
AI applications in the area of security have indeed enhanced the efficiency of gap detection, ancillary analysis and logical proof. However, the development of tools has not changed the objective patterns of basic software engineering.
The logic of the code is self-conforming and is always based on the stable operation of the bottom interpreter. In the face of serious deficiencies such as CVE-2026-109618, which occur at the bottom, the mere reliance on tests or mathematical evidence of upper-level codes is not sufficient to eliminate the risk. Looking at the boundaries of the means of certification, combining controlled and re-emergible infrastructure with the timely application of security patches for active versions and historical legacy systems, is the solid path to ensure the stable operation of services.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.