medium

CVE-2026-142637

Packagist · laravel/framework

Summary

Laravel: Fluent Rule::exists() and Rule::unique() where() values can be interpreted as reserved predicates instead of literal values

Severity
medium
CVSS
4.8
EPSS
0.3% (p28)
CWE
CWE-943
Also known as
GHSA-ch34-gjmh-c4hp
Published
2026-12-03
Updated
2026-12-03

Advisory details

Impact

When Rule::exists() or Rule::unique() is scoped with the fluent where() method, the condition is serialized into the string rule format and parsed again. A scalar value of NULL, NOT_NULL, or one starting with ! could be evaluated as an IS NULL, IS NOT NULL, or not-equal predicate instead of a literal comparison. If an attacker can influence a scope value, such as a tenant key, and the application relies on the rule to verify ownership of a referenced record, the validation can accept records from other scopes. For unique, the scope can be widened. Applications that use independent authorization checks or closure-based where() conditions are not affected in the same way.

Patches

A fix that makes the validator read conditions from the rule object so where() values are compared literally is proposed in laravel/framework pull requests 62425 (13.x) and 62426 (12.x).

Workarounds

Do not pass user-influenced values to the scalar where() form. Use a closure-based where() and perform independent ownership authorization of referenced records.

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.