Vulnerability DatabaseGHSA-p5q8-69rj-ff33

GHSA-p5q8-69rj-ff33: 
PHP vulnerability analysis and mitigation

Summary

Ray\Di\Injector created without a tmpDir argument, or with a tmpDir that does not exist, stores generated AOP proxy and null-object classes directly in the system temp directory and loads an existing file from there instead of regenerating it. On a host where that directory is shared with other local users (for example /tmp on Linux), another user can place a file under the expected file name, and it is executed with the privileges of the application.

Details

  • Injector::__construct() falls back to sys_get_temp_dir() when is_dir($tmpDir) is false and checks only is_writable(). That directory is passed to Ray\Aop\Compiler and to Koriym\NullObject, both of which require <classDir>/<Class_Name><postfix>.php when the file exists. The postfix is derived from source file modification times, the bindings and the directory path, so the name is predictable.
  • Grapher::__construct() builds its inner Injector without passing its own classDir, so null-object classes are loaded from the system temp directory even when a private directory is given to Grapher.
  • Injector::__wakeup() and Grapher::__wakeup() register an autoloader that includes <classDir>/<Class_Name>.php for any class name no earlier autoloader resolves, not only generated classes. An Injector serialized with the default directory carries the system temp directory as classDir. This is the Ray.Di counterpart of GHSA-hx92-2qxg-m977 in Ray.Aop. Ray.Di calls Ray\Aop\Compiler directly and chooses the directory itself, so the Ray.Aop fix for new Aspect() does not cover it.

Impact

Local code execution as the application user, for applications that construct Injector without an existing, private tmpDir (or use Grapher) on a host whose system temp directory is writable by another local user. Applications that pass an existing directory only they can write to Injector are not affected by the first item. Loading of a pre-placed file was reproduced in a single-user sandbox for all three items. It has not yet been reproduced with two OS users.

Workarounds

Pass an existing directory that only the application user can write as the second argument of Injector, and do not use Grapher with untrusted local users on the host.


Source: NVD

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-hx92-2qxg-m977HIGH7.8
  • PHP logoPHP
  • ray/aop
NoYesNov 21, 2026
GHSA-p5q8-69rj-ff33HIGH7.8
  • PHP logoPHP
  • ray/di
NoYesNov 21, 2026
GHSA-vpqj-26g5-4qqmHIGH7.4
  • PHP logoPHP
  • simplesamlphp/saml2
NoNoNov 22, 2026
GHSA-2g6w-c7gx-fxj8MEDIUM5.4
  • PHP logoPHP
  • guzzlehttp/guzzle
NoYesNov 21, 2026
GHSA-m9j4-54gj-jvf8MEDIUM5.3
  • PHP logoPHP
  • league/csv
NoYesNov 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management