Re: [Concept] Flip relative function lookup order (global, then local)

From: Date: Wed, 21 Aug 2024 18:32:55 +0000
Subject: Re: [Concept] Flip relative function lookup order (global, then local)
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message


On Aug 21 2024, at 2:10 pm, Ilija Tovilo <[email protected]> wrote:
>
> Including a malicious composer package already allows for arbitrary
> code execution, do you really need more than that?
>

Of course. We've seen many examples in the wild of 3rd party libraries getting hijacked to
inject malicious code (e.g. the whole xz attack). This behavior in PHP is not obvious, and provides
a way to covertly target and hijack specific highly sensitive functions without an obvious way to
detect it -- while otherwise behaving exactly as a developer would expect.
Why possibly would we want to make it easier to perform such an attack, which as Illija pointed out
is actually making PHP slower, in the name of backward compatibility? Defense in depth is a
cornerstone of application security.
John


Thread (112 messages)

« previous php.internals (#125094) next »