Laravel: Numeric validation can exhaust resources via extreme exponent inputGHSA-c25c-x5r7-2v5m
HIGHFix: laravel/framework#62589GHSA-c25c-x5r7-2v5m is a high-severity (CVSS 7.5) CWE-770 vulnerability in laravel/framework. A fix is available for laravel/framework — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-c25c-x5r7-2v5m.
Real-World Exposure
laravel/framework🐘laravel/frameworkReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Impact
The multiple_of validation rule, and the gt, gte, lt and lte rules when they compare against another numeric field, expand numeric input using arbitrary-precision arithmetic without bounding its exponent. A request containing a very small or very large exponent value, such as one in scientific notation, can cause excessive memory and CPU use and may exhaust PHP's memory limit. Applications are affected when these rules are applied to an unbounded numeric field, with no preceding bounding rule such as min, max or between combined with bail. Comparisons against literal numbers, and the min, max, between and size rules, are not affected.
Patches
The fix applies the framework's existing exponent range guard to these rules. It has been merged to the 12.x and 13.x branches: https://github.com/laravel/framework/pull/62589 and https://github.com/laravel/framework/pull/62590.
Workarounds
Bound the value before the affected rule and stop on failure, for example bail|numeric|min:0|max:100|multiple_of:2. Setting a low PHP memory limit can also make PHP stop early with a fatal error.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | laravel/framework | all versions | 12.74.0composer require laravel/framework:^12.74.0 |
| 🐘Packagist | laravel/framework | ≥ 13.0.0&&< 13.44.1 | 13.44.1composer require laravel/framework:^13.44.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for laravel/framework, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update laravel/framework to 12.74.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c25c-x5r7-2v5m is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is GHSA-c25c-x5r7-2v5m in your dependencies?
Find it across Packagist, including transitive dependencies.