Vulnerability DatabaseGHSA-hx92-2qxg-m977

GHSA-hx92-2qxg-m977: 
PHP vulnerability analysis and mitigation

Summary

Ray\Aop\Aspect created without a directory argument (new Aspect()) stored generated proxy classes directly in the system temp directory and loaded an existing proxy 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 proxy file name, and it is executed with the privileges of the application.

Details

Weaver::weave() and Compiler::compile() require <classDir>/<Class_Name><postfix>.php when the file exists. The postfix is a CRC32 of the source file's modification time, the serialized bindings, the directory name and a generation number, all of which a local user who can read the application's source can compute. Since 2.16.0, Aspect::__construct() defaulted classDir to sys_get_temp_dir(). Only the default directory of Aspect is affected. Applications that pass their own script directory to Aspect, Weaver or Compiler are not affected as long as that directory is not writable by other users. The fix makes new Aspect() use a per-user ray-aop-<uid> directory (mode 0700) under the system temp directory and refuse it when it is owned by another user or writable by group/other.

Proof of concept

Verified locally in an isolated directory standing in for a shared temp directory:

  1. As a second local user, compute the proxy file name for a class the application weaves (class name plus the CRC32 postfix described above) and create that file in the directory, declaring a class of that name that extends the target class.
  2. Run the application, which calls (new Aspect())->newInstance(Target::class).
  3. The planted file is required: its top-level code runs, and the returned object is the planted class without WeavedInterface, so no interceptor is applied.

Impact

Local code execution as the application user, and silent loss of the bound interceptors for the affected class. You are affected if you call new Aspect() without a directory and the system temp directory is writable by a local user you do not trust. Single-user hosts, containers, and platforms with a per-user temp directory (macOS, Windows) are not affected. Workaround: pass a directory that only the application user can write, e.g. new Aspect('/path/to/private/dir').


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