Laravel: `in` / `Rule::in` validation rule bypass via loose comparison
- CVE-2026-142649
- GHSA-h2hg-mfj4-rg7q
- EUVD-2026-141976
Description
Laravel is a web application framework. Prior to 12.67.0 and 13.26.0, The in validation rule (and Rule::in, and not_in via the same code) compares the scalar input to the allowlist with a non-strict in_array(). PHP 8 then compares numeric strings numerically, so many values that are not literally in the list pass validation , including whitespace-padded, leading-zero, signed, and scientific-notation forms, and an embedded newline. The value returned by validated() / valid() is the raw, un-canonicalized input, so the attacker-controlled bytes flow through to the application even though the rule was supposed to constrain them to a fixed set. The array branch of the same method already compares as strings (array_diff), so this is an internal inconsistency, not intended behavior. Any allowlist of numeric values , feature flags (in:0,1), status codes, role/tenant/enum IDs stored as integers may be bypassed with an equivalent-but-not-identical representation. This issue is fixed in versions 12.67.0 and 13.26.0.
Text from the CVE.org record.
Recommendation
laravel/framework
- If you run a version from 13.0.0 to before 13.26.0update to 13.26.0 or laterMinor version change: check the release noteslaravel/framework 13.26.0 on its registry (opens in a new tab)
- If you run a version before 12.67.0update to 12.67.0 or laterlaravel/framework 12.67.0 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
laravel framework
Affected versions Fixed in < 12.67.0 none stated >= 13.0.0, < 13.26.0 none stated laravel/frameworkPackagist
Affected versions Fixed in from 13.0.0 to before 13.26.0 13.26.0 before 12.67.0 12.67.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.