CVE-2026-142611: Laravel: Empty array key validation bypass
Laravel is a web application framework. Prior to 13.43.0 and 12.73.0, When validated input contains an array element whose key is an empty string, such as {"items": {"": {"name": "..."}}} in a JSON request, the rules attached to items. are never applied to that element. ValidationRuleParser already matches empty segments with [^\.], but ValidationData::extractValuesForWildcards() and Validator::getExplicitKeys() still use [^.]+, so the element is never gathered and wildcard parameters such as requiredif:users..role,admin are not resolved for it. Rules like Rule::forEach() or array:name,qty on items. are silently skipped for that element. This issue is fixed in versions 13.43.0 and 12.73.0.
Other sources
Laravel: Empty array key validation bypass
— Packagist
When validated input contains an array element whose key is an empty string, such as {"items": {"": {"name": "..."}}} in a JSON request, the rules attached to items. are never applied to that element. ValidationRuleParser already matches empty segments with [^\.], but ValidationData::extractValuesForWildcards() and Validator::getExplicitKeys() still use [^\.]+, so the element is never gathered and wildcard parameters such as requiredif:users..role,admin are not resolved for it. Rules like Rule::forEach() or array:name,qty on items. are silently skipped for that element.
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/laravel/frameworkto a version that resolves this vulnerability.Fixed in 12.73.0 - Upgrade
Upgrade
composer/laravel/frameworkto a version that resolves this vulnerability.Fixed in 13.43.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 13.43.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.73.0
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using composer/laravel/framework before version 13.43.0 or 12.73.0 are affected if they validate array elements through wildcard rules such as items.* and accept attacker-controlled JSON object keys.
What does an attacker need to exploit the validation bypass?
The attacker needs the ability to submit validated input containing an array element with an empty-string key, for example an items object with a "" key. The affected validation must rely on wildcard rules or wildcard parameters for that element.
Which validation logic can be skipped?
Rules attached to items.* are not applied to the empty-key element. This can silently skip Rule::forEach(), array:name,qty checks, and resolution of wildcard parameters such as required_if:users.*.role,admin.
How can I determine whether my application is vulnerable?
Check whether the installed Laravel framework version is earlier than 13.43.0 or 12.73.0, and review validation paths that accept JSON objects or arrays with user-controlled keys. Test whether a payload containing an empty-string key bypasses rules assigned through a wildcard path such as items.*.
What should be done to remediate the issue?
Update Laravel to version 13.43.0 or 12.73.0. If an update cannot be applied immediately, restrict or reject empty-string keys in untrusted JSON input before it reaches Laravel wildcard validation.