Article View: comp.os.vms
Article #115Re: ‘This Is Not a Drill’: Critical PHP Vulnerabilities Are Setting the Internet on Fire
From: Arne Vajhøj
Date: Wed, 28 Oct 2026 00:33
Date: Wed, 28 Oct 2026 00:33
105 lines
4854 bytes
4854 bytes
On 10/24/2026 8:45 PM, Dan Cross wrote:
> In article <11bji28$36hh1$1@dont-email.me>,
> Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 10/24/2026 5:04 PM, Dan Cross wrote:
>>> In article <11bj186$30n6f$1@dont-email.me>,
>>> Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 10/23/2026 9:59 PM, Dan Cross wrote:
>>>>> It's probably true that a language like PHP shouldn't have that
>>>>> kind of thing built into it. But it's also true that that's a
>>>>> programming error (failure to sanitize one's input).
>>>>
>>>> Practically every technology provide a way to execute external
>>>> commands.
>>>
>>> Indeed, but the danger isn't the mechanism, it is the specific
>>> implementation. PHP is very often used to build applications
>>> that are exposed to all kinds of untrusted inputs. Backticks in
>>> an environment where much input is untrusted, for example, seem
>>> unnecessarily permissive.
>>
>> Almost all languages has the capability including languages
>> used for web.
>
> ...and?
>
>> Even if Bill write CGI script in VMS Cobol he could call LIB$SPAWN.
>
> ...and?
>
>> And unlike many other languages then it easy to block in PHP.
>>
>> Just add:
>>
>> disable_functions = shell_exec
>>
>> to php.ini and it is gone.
>
> This misses the point. A) the person writing the program has to
> be the one configuring `php.ini`. B) you are comparing
> interfaces that are designed for _explicit_ use in controlled
> ways with one designed to easily interpolate values that are
> ambient *in the lexical context of the invoking code*. One is
> significantly _easier_ to misuse than the other. Because that
> language is also designed to process inherently untrusted data,
> it must be used with significant care; yet it is positioned as
> the easy-to-use beginners language. That's a dangerous mix.
I can not follow.
Let me show some code. I will substitute Cobol with Fortran - I think
Fortran is clearer to illustrate the point than Cobol.
PHP with shell_exec:
<?php
header("Content-type: text/plain");
$cmd = $_GET['cmd'];
echo shell_exec($cmd);
?>
PHP with backticks:
<?php
header("Content-type: text/plain");
$cmd = $_GET['cmd'];
echo `$cmd`;
?>
Fortran code calling LIB$SPAWN:
integer*4 cmdlen
character*80 cmd
write(*,*) 'content-type: text/plain'
write(*,*)
call lib$get_symbol('query_string', cmd, cmdlen);
call lib$spawn(cmd(5:cmdlen));
end
The code is different:
* PHP is different from Fortran
* the Fortran code is more lax with the query string parse
* in the PHP code the output goes via a PHP string - in the
Fortran code it goes direct
* the actual command execution is triggered by PHP function,
PHP builtin and OS function respectively
But I don't see any of the differences matter from a
security perspective.
They are all unchecked input being executed as external
command.
They are all very easy to do for a web developer
knowing the language.
The syntax is so explicit that it is not likely to happen
by accident.
The biggest difference in security is that one can disable
shell_exec (and exec and passthru and proc_* and system)
and still run PHP while it is a bit hard to disable LIB$SPAWN
(and LIB$DO_COMMAND and SYS$CREPRC) without disabling CGI.
Arne
Technical Details
Message-ID:
<11brfro$20u59$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11bcbi1$k068$1@dont-email.me> <11bj186$30n6f$1@dont-email.me> <11bj6gh$mru$1@reader2.panix.com> <11bji28$36hh1$1@dont-email.me> <11bjjek$j9t$1@reader2.panix.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Arne Vajhøj <arne@vajhoej.dk> Newsgroups: comp.os.vms Subject: Re: ‘This Is Not a Drill’: Critical PHP Vulnerabilities Are Setting the Internet on Fire Date: Tue, 27 Oct 2026 20:33:13 -0400 Organization: A noiseless patient Spider Lines: 105 Message-ID: <11brfro$20u59$1@dont-email.me> References: <11bcbi1$k068$1@dont-email.me> <11bj186$30n6f$1@dont-email.me> <11bj6gh$mru$1@reader2.panix.com> <11bji28$36hh1$1@dont-email.me> <11bjjek$j9t$1@reader2.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 28 Oct 2026 00:32:57 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2128041"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z0p0nSZ3sd5Zoy+R/97BFrYMSW80Bbs8="; posting-host="9b8ac2dbd3a96ffde163ebf9ca27ddb3" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:yI/dr/baPrJgA9KlWsHfI317J5U= sha256:dgNt2zWQghW+Af0+npZd3TLS+OZ8hzyaUjE/s2iADaQ= sha1:PvHlpFdsugXfdFm/hQQQpmyXCDw= sha256:oNJgiYWMRVvlQa3gnB5Cfhmbt4v5oJfZAfcUg+uqL4c= Content-Language: en-US In-Reply-To: <11bjjek$j9t$1@reader2.panix.com>