Article View: comp.os.vms
Article #122Re: ‘This Is Not a Drill’: Critical PHP Vulnerabilities Are Setting the Internet on Fire
From: Arne Vajhøj
Date: Thu, 29 Oct 2026 00:44
Date: Thu, 29 Oct 2026 00:44
83 lines
4335 bytes
4335 bytes
On 10/28/2026 12:47 AM, Lawrence D’Oliveiro wrote:
> On Tue, 27 Oct 2026 20:33:13 -0400, Arne Vajhøj wrote:
>> 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.
>
> Another issue is that VMS suffers from the same fundamental limitation
> as Windows: why the call is named “shell_exec” in the first place --
> because it is assumed to be always be going through a shell.
>
> On Unix-type systems, it is common for one program to directly spawn
> another without going through a shell. This avoids, at one stroke, all
> the potential problems with having to escape characters with special
> meanings to the shell. For example, dollar signs and spaces in file
> names, special characters indicating pipes, redirections etc. This
> makes the spawning of external commands much safer.
Hmmm.
First then the shell question is not really an issue on VMS. On VMS
starting a program via shell does not create two processes - it only
creates one process with DCL in P1 and the program in P0/P2.
Second then on VMS it is possible to create a process with DCL mapped
or a process without DCL mapped - your choice.
PHP shell_exec starts a process with DCL mapped. It has to given
what it does:
Execute command via shell and return the complete output as a string
For those interested in some details:
$ type p1.for
implicit none
include '($jpidef)'
include '($prcdef)'
integer*4 pid,trmlen
character*16 trm
call lib$getjpi(jpi$_pid,,,pid)
write(*,*) 'pid=',pid
write(*,*) 'sys$creprc:'
call lib$getjpi(jpi$_terminal,,,,trm,trmlen)
call sys$creprc(,'p2.exe',,trm(1:trmlen),
+ ,,,,,,,%val(prc$m_detach),,,)
call lib$wait(0.1,,4) ! give process time to end
write(*,*) 'lib$spawn:'
call lib$spawn('run p2')
write(*,*) 'lib$do_command:'
call lib$do_command('run p2')
end
$ type p2.for
implicit none
include '($jpidef)'
integer*4 pid,owner
integer*4 lib$spawn
call lib$getjpi(jpi$_pid,,,pid)
write(*,*) 'pid=',pid
call lib$getjpi(jpi$_owner,,,owner)
write(*,*) 'ownerpid=',owner
write(*,*) 'clipresent=',lib$spawn('continue').eq.1
end
$ for p1
$ link p1
$ for p2
$ link p2
$ run p1
pid= 1059
sys$creprc:
pid= 1107
ownerpid= 0
clipresent= F
lib$spawn:
pid= 1108
ownerpid= 1059
clipresent= T
lib$do_command:
pid= 1059
ownerpid= 0
clipresent= T
Arne
Technical Details
Message-ID:
<11bu4tj$2u4tg$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> <11brfro$20u59$1@dont-email.me> <11brups$24k82$2@dont-email.me>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: Wed, 28 Oct 2026 20:44:54 -0400 Organization: A noiseless patient Spider Lines: 83 Message-ID: <11bu4tj$2u4tg$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> <11brfro$20u59$1@dont-email.me> <11brups$24k82$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 29 Oct 2026 00:44:36 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3085232"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194CyvdROFiAk5lBZaYe1OqjWZfegwUfs0="; posting-host="deb361e9127f843823c64b56f5ce8187" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:joT2j+A6N+tfZ7JhzTsKpfTnQ7A= sha256:TAIisBwLJIijbw42P4MQeKcK1E03ytMSL++P0u+CPPo= sha1:LVuAr+3UL6SiUqAEfDl/x6EAdII= sha256:5BTtLOiTmQtf05TsDsLUG9cbsznwR0byZNjjquxcTWg= Content-Language: en-US In-Reply-To: <11brups$24k82$2@dont-email.me>