CVE-2026-142649: Laravel: `in` / `Rule::in` validation rule bypass via loose comparison

Published Dec 2, 2026
·
Updated

Laravel is a web application framework. Prior to 12.67.0 and 13.26.0, 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. 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.

Affected Software

1 affected component
Laravel Laravel<12.67.0, <13.26.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 12.67.0
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 13.26.0

Event History

Dec 2, 2026
CVE Published
via MITRE·11:05 PM
Data Sourced
via MITRE·11:05 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this bypass?

Applications using Laravel versions before 12.67.0 or 13.26.0 are exposed where scalar request input is validated with in, Rule::in, or not_in against numeric allowlist values. Common affected uses include feature flags, status codes, and integer-backed role, tenant, or enum IDs.

2

What does an attacker need to exploit the issue?

An attacker only needs to submit a scalar value to a validation path using one of the affected rules. They can use a numerically equivalent but non-identical representation, such as whitespace-padded, leading-zero, signed, scientific-notation, or newline-containing input.

3

Why can this matter if validation succeeds?

validated() and valid() return the original raw input rather than a canonicalized allowlist value. As a result, attacker-controlled bytes can reach application logic despite the value having passed an allowlist check.

4

Are array inputs affected in the same way?

No. The array branch uses string comparison through array_diff, so the described loose-comparison bypass applies to scalar input handling.

5

What versions contain the fix?

The issue is fixed in Laravel 12.67.0 and 13.26.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203