cvelo
P3 · MediumCVSS 5.3EPSS 0.4%

Laravel: Validation exists rule can be bypassed with integer or boolean input on MySQL/MariaDB

  • CVE-2026-142643
  • GHSA-wwq3-m3j5-wv66
  • EUVD-2026-141971

Description

Laravel is a web application framework. Prior to 13.43.0 and 12.73.0, The exists and unique validation rules passed integer and boolean values from the request unchanged to the database query. On MySQL and MariaDB, comparing a string column with an integer casts the column to a number. As a result, JSON input such as 0, false or [0] could satisfy a rule like required|exists:invites,code on a non-numeric string column without a valid value. An unauthenticated attacker who can submit JSON could bypass "must reference an existing record" checks. PostgreSQL and SQLite are not affected. Form-encoded input is always a string and is not affected. This issue is fixed in versions 13.43.0 and 12.73.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
    >= 13.0.0, < 13.43.0none stated
    < 12.73.0none stated
  • laravel/frameworkPackagist

    Affected versionsFixed in
    from 13.0.0 to before 13.43.013.43.0
    before 12.73.012.73.0

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.