medium

CVE-2026-142644

Packagist · laravel/framework

Summary

Laravel: Quadratic regex backtracking in the decimal validation rule can cause denial of service

Severity
medium
CVSS
5.3
EPSS
0.6% (p50)
CWE
CWE-1333
Also known as
GHSA-h84h-g58v-xg2h
Published
2026-12-03
Updated
2026-12-03

Advisory details

Impact

The decimal validation rule counts decimal places with a regular expression that backtracks quadratically on certain input. A very long run of digits followed by an exponent (for example, a value ending in e5) passes the rule's is_numeric() check and then forces excessive regex backtracking before the match fails. Any application that validates a request field with the decimal rule is affected, with no non-default configuration. A single large request can consume several seconds of worker CPU, so a low rate of such requests can exhaust the PHP worker pool and cause denial of service.

Patches

The fix makes the regular expression's quantifiers possessive, which removes the backtracking without changing validation results. Fixes have been proposed for the 13.x and 12.x branches in https://github.com/laravel/framework/pull/62420 and https://github.com/laravel/framework/pull/62421.

Workarounds

Use the bail rule and order a size-limiting rule such as max or digits_between before decimal, so oversized values are rejected before the decimal rule runs.

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.