cvelo
P3 · MediumCVSS 5.3EPSS 0.6%

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

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 versionsFixed in
    < 12.67.0none stated
    >= 13.0.0, < 13.26.0none stated
  • laravel/frameworkPackagist

    Affected versionsFixed in
    from 13.0.0 to before 13.26.013.26.0
    before 12.67.012.67.0

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.