{"id":"CVE-2026-142643","aliases":["GHSA-wwq3-m3j5-wv66"],"url":"https://o3.security/vulnerability/CVE-2026-142643","summary":"Laravel: Validation exists rule can be bypassed with integer or boolean input on MySQL/MariaDB","details":"### Impact\n\nThe `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.\n\n### Patches\n\n`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).\n\n### Workarounds\n\nAdd the `string` rule (or `integer`, as appropriate) before `exists` and `unique` rules, or cast the input in `prepareForValidation()`.","published":"2026-12-02T22:51:17.388Z","modified":"2026-12-03T21:02:20.225772785Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"Packagist","name":"laravel/framework","fixedVersion":"13.43.0"},{"ecosystem":"Packagist","name":"laravel/framework","fixedVersion":"12.73.0"}],"fix":{"url":"https://github.com/laravel/framework/commit/2b517db47fca33b9bf48a15287af63702ace3f99","label":"laravel/framework@2b517db"},"references":[{"type":"WEB","url":"https://github.com/laravel/framework/releases/tag/v12.73.0"},{"type":"WEB","url":"https://github.com/laravel/framework/releases/tag/v13.43.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142643.json"},{"type":"ADVISORY","url":"https://github.com/laravel/framework/security/advisories/GHSA-wwq3-m3j5-wv66"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142643"},{"type":"FIX","url":"https://github.com/laravel/framework/commit/2b517db47fca33b9bf48a15287af63702ace3f99"},{"type":"FIX","url":"https://github.com/laravel/framework/commit/a26c3295498fc4de4b878d634fe2a9ae264d9a29"},{"type":"FIX","url":"https://github.com/laravel/framework/pull/62447"},{"type":"FIX","url":"https://github.com/laravel/framework/pull/62448"},{"type":"PACKAGE","url":"https://github.com/laravel/framework"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-12-03T21:02:20.225772785Z"}}