PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet
Vulnerability DatabaseGHSA-r7jf-qg97-xhw9

GHSA-r7jf-qg97-xhw9: 
PHP vulnerability analysis and mitigation

Impact

examples.faker_seed (default 1234) is applied through Faker's Generator::seed(), which calls mt_srand(). That seeds PHP's process-wide Mersenne Twister. Scribe reseeds it each time it hands out the generator, and also seeds the container's Faker and fake() for model factories. Nothing reseeds it randomly when generation ends. Running php artisan scribe:generate as its own process is not affected, because the process exits. The package also ships RegenerateDocumentation, which runs the command in-process through the console kernel, and the docs describe calling it from a queued job, a scheduled task or a request. On the sync, background or deferred drivers, that is the long-lived Swoole worker that serves HTTP. Afterwards, mt_rand(), rand(), array_rand(), shuffle() and str_shuffle() in that worker continue from a known seed. While generation runs, other coroutines in the same worker are repeatedly reset to the same sequence. Hypervel's own security-relevant randomness (Str::random, tokens, Arr::random) does not use the Mersenne Twister, so exploitation also needs application code that uses those functions for something secret, such as invite codes or one-time codes.

Root cause

  • src/Extracting/SeededFaker.php calls $faker->seed($seed) on every hand-out.
  • src/Extracting/InstantiatesExampleModels.php seeds the factory Faker instances.
  • The finally block in src/Commands/GenerateDocumentation.php and RunState::flush() release the generator, but do not reseed mt_srand(). A related inconsistency: SeededFaker treats any falsy seed as unseeded, but InstantiatesExampleModels checks for null, so a seed of 0 still seeds the factories.

Patches

Fixed in 0.2.5. scribe:generate reseeds PHP's global Mersenne Twister randomly when it finishes, so a worker that ran it in-process no longer continues from the configured seed afterwards. A seed of 0 is now treated as unseeded by the model factories too, as the config documents. While generation runs, other coroutines in the same worker still draw from the seeded sequence: Faker 1.x can only seed the global generator. If the application uses mt_rand(), shuffle() or similar for anything secret, run generation in a process of its own (see Workarounds).

Workarounds

  • Set examples.faker_seed => null. 0 is not enough, for the reason above.
  • Run scribe:generate as a separate process, or send RegenerateDocumentation to a dedicated queue worker, not to the sync, background or deferred drivers.
  • Call mt_srand() with no argument after any in-process Artisan::call('scribe:generate').

Source: NVD

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-114509CRITICAL9.2
  • PHP logoPHP
  • laravel/framework
NoYesOct 21, 2026
CVE-2026-109619HIGH8.1
  • PHP logoPHP
  • php-process-debuginfo
NoYesOct 21, 2026
CVE-2026-109618HIGH8.1
  • PHP logoPHP
  • php:7.4::php-mysqlnd
NoYesOct 21, 2026
GHSA-r7jf-qg97-xhw9LOW3.7
  • PHP logoPHP
  • ipsocode/hypervel-scribe
NoYesOct 21, 2026
GHSA-cf9x-r3xf-wp2pLOW3.1
  • PHP logoPHP
  • ipsocode/hypervel-scribe
NoYesOct 21, 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

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