Skip to content
Medium 5.3

Input validation bypass using `distinct` empty keys

GHSA-w89r-9vfr-qfrm First seen on SecPulse

Summary

Impact

The distinct validation rule could be bypassed when applied to a wildcard attribute with two or more * segments (for example items.*.tags.*). If a JSON request body used an empty string as an object key, the affected entries were still validated but were left out of the set of va...

Affected packages

PackageAffected → Fixed
composerlaravel/framework
<12.75.0→ >=12.75.0
composerlaravel/framework
<13.45.0→ >=13.45.0
Original description The description as published by the source.

Impact

The distinct validation rule could be bypassed when applied to a wildcard attribute with two or more * segments (for example items.*.tags.*). If a JSON request body used an empty string as an object key, the affected entries were still validated but were left out of the set of values compared for duplicates. Duplicate values the application intended to reject could therefore pass validation. The impact is limited to data integrity in applications that rely on distinct for such attributes.

Patches

The issue is fixed by making the distinct rule match array keys with the same wildcard pattern used by rule expansion, in the 12.x and 13.x branches: https://github.com/laravel/framework/pull/62667 and https://github.com/laravel/framework/pull/62666

Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details