Skip to content
Medium 5.3

Denial of Service using the `distinct` validation rule

GHSA-jrc9-gpx2-4p3r First seen on SecPulse

Summary

Impact

The distinct validation rule could take quadratic time when validating large wildcard arrays. An unauthenticated attacker who can submit a large array to an endpoint that validates it with distinct (for example items.*) could consume excessive CPU time and exhaust application wor...

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 take quadratic time when validating large wildcard arrays. An unauthenticated attacker who can submit a large array to an endpoint that validates it with distinct (for example items.*) could consume excessive CPU time and exhaust application workers. Affected values include booleans, null, empty arrays and, with ignore_case, non-string values. A request of roughly 220 KB could exceed the default PHP execution time limit.

Patches

The distinct rule now groups values by how PHP compares them, so each item is compared with only a small number of values. The fix was merged to the 12.x and 13.x branches in laravel/framework

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