
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-142643 is a type confusion vulnerability in the Laravel PHP web application framework that allows unauthenticated attackers to bypass exists and unique validation rules by submitting specially crafted JSON input. The flaw affects Laravel framework versions prior to 12.73.0 and versions 13.0.0 through 13.42.x (prior to 13.43.0), and is specific to applications using MySQL or MariaDB as the database backend. It was disclosed on December 2, 2026, with the underlying fix merged on November 12, 2026. The vulnerability carries a CVSS v3.1 base score of 5.3 (Medium) (GitHub Advisory, Feedly).
The root cause is classified under CWE-843 (Access of Resource Using Incompatible Type / Type Confusion) and CWE-1287 (Improper Validation of Specified Type of Input). Laravel's DatabasePresenceVerifier class passed integer and boolean values received from JSON requests directly to the database query builder without type coercion, binding them as native PHP integers or booleans. On MySQL and MariaDB, when a bound integer is compared against a string (VARCHAR) column, the database engine implicitly casts the string column to a number — meaning any non-numeric string evaluates to 0, causing values like JSON 0, false, or [0] to satisfy an exists:invites,code rule on a non-numeric string column. The fix introduces a prepareValue() method in DatabasePresenceVerifier that casts integers to their string representation and booleans to '1' or '0' before query binding (GitHub Advisory, PR #62447, Commit 2b517db).
Successful exploitation allows an unauthenticated attacker to bypass application-level record existence checks, potentially gaining access to features or resources that require a valid reference to an existing database record (e.g., invite codes, tokens, or access keys). The primary impact is a confidentiality breach (CVSS C:L), as attackers may access restricted application areas or data without possessing a legitimate credential. Integrity and availability are not directly impacted by this vulnerability, and PostgreSQL, SQLite, and form-encoded (non-JSON) inputs are unaffected (GitHub Advisory).
No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The EPSS score is 0.0, indicating a currently low probability of exploitation in the wild, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, the attack requires no authentication, no user interaction, and low complexity — any application endpoint that accepts JSON and uses exists or unique validation rules against a MySQL/MariaDB string column is potentially vulnerable (Feedly, GitHub Advisory).
exists or unique validation rules on non-numeric string columns (e.g., invite codes, coupon codes, or access tokens).required|exists:invites,code, where code is a VARCHAR column.{"code": 0}, {"code": false}, or {"code": [0]}.Content-Type: application/json to the target endpoint. The Laravel validator passes the integer 0 to DatabasePresenceVerifier, which binds it as an integer to the SQL query.code column to 0 for comparison, causing the query to return a non-zero count and the exists rule to pass — even though no record with code 0 exists.Content-Type: application/json headers containing integer or boolean values (0, false) in fields expected to hold string tokens or codes.0, false, or a single-element array like [0]; repeated requests from the same IP with varying integer/boolean payloads suggesting probing behavior.WHERE code = 0 or equivalent integer comparisons against VARCHAR columns.Upgrade to Laravel framework version 13.43.0 (for the 13.x branch) or 12.73.0 (for the 12.x branch), which include the fix in DatabasePresenceVerifier (GitHub Advisory, PR #62447, PR #62448). As a temporary workaround without upgrading, prepend a string (or integer, as appropriate) rule before exists and unique rules in your validation logic (e.g., required|string|exists:invites,code), or cast the input to the expected type in the controller's prepareForValidation() method. Applications using PostgreSQL or SQLite, or those that only accept form-encoded (non-JSON) input, are not affected and do not require immediate action.
The vulnerability was reported by researcher localhost8080 and the fix was authored by contributor pushpak1300 and merged by Laravel creator Taylor Otwell on November 12, 2026 (PR #62447). A community blog post titled "Your Laravel exists rule let 0 through on MySQL" was published on November 20, 2026, indicating awareness within the Laravel developer community (PR #62448). The issue was discussed on Mastodon's infosec.exchange and tracked across multiple vulnerability aggregators shortly after public disclosure.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."