Laravel: Validation exists rule can be bypassed with integer or boolean input on MySQL/MariaDB
CVE-2026-142643
Impact 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. Patches DatabasePresenceVerifier now compares integers and booleans as strings. The fixes are merged on the 13.x branch (https://github.com/laravel/framework/pull/62447) and the 12.x branch (https://github.com/laravel/framework/pull/62448). Workarounds Add the string rule (or integer, as appropriate) before exists and unique rules, or cast the input in prepareForValidation().
Assessment
- CVSS
- 5.3 (v3.1)
- Severity
- Medium
- EPSS
- 0.0044% 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-1287, CWE-843
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
At the source
References
- https://github.com/laravel/framework/security/advisories/GHSA-wwq3-m3j5-wv66
- https://nvd.nist.gov/vuln/detail/CVE-2026-142643
- https://github.com/laravel/framework/pull/62447
- https://github.com/laravel/framework/pull/62448
- https://github.com/laravel/framework/commit/2b517db47fca33b9bf48a15287af63702ace3f99
- https://github.com/laravel/framework/commit/a26c3295498fc4de4b878d634fe2a9ae264d9a29
- https://github.com/laravel/framework/releases/tag/v12.73.0
- https://github.com/laravel/framework/releases/tag/v13.43.0
- https://github.com/advisories/GHSA-wwq3-m3j5-wv66
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-142643