
Cloud Vulnerability DB
A community-led vulnerabilities database
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.
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.
Verified locally in an isolated directory standing in for a shared temp directory:
(new Aspect())->newInstance(Target::class).required: its top-level code runs, and the returned object is the planted class without WeavedInterface, so no interceptor is applied.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
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."