Laravel: `in` / `Rule::in` validation rule bypass via loose comparison
CVE-2026-142649
Summary The in validation rule (and Rule::in, and notin via the same code) compares the scalar input to the allowlist with a non-strict inarray(). 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 (arraydiff), so this is an internal inconsistency, not intended behavior. Impact 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. Patched Fixed in [#61146](https://github.com/laravel/framework/pull/61146) Reported by — Sergey Sannikov, GitHub @semx
Assessment
- CVSS
- 5.3 (v3.1)
- Severity
- Medium
- EPSS
- 0.00459% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 3 December 2026
- Last updated
- 3 December 2026
- Affected
- laravel · framework · laravel/framework
- Weakness
- CWE-697
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
At the source
References
- https://github.com/laravel/framework/security/advisories/GHSA-h2hg-mfj4-rg7q
- https://nvd.nist.gov/vuln/detail/CVE-2026-142649
- https://github.com/laravel/framework/pull/61146
- https://github.com/laravel/framework/commit/0db83d4177675d9290bee91f33f90b2b5828e56e
- https://github.com/laravel/framework/releases/tag/v12.67.0
- https://github.com/laravel/framework/releases/tag/v13.26.0
- https://github.com/advisories/GHSA-h2hg-mfj4-rg7q
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-142649