potential denial of service attack via the locale parameter
Django treated the locale parameter in internationalised URLs as a regular expression, so a crafted value could cause a denial of service. An attacker could send a specially crafted locale parameter to make the site slow or unresponsive.
Originally disclosed on HackerOne
- Fixed in 37 days
- Paid in 37 days
- Disclosed after 38 days
In Django 3.2 before 3.2.16, 4.0 before 4.0.8, and 4.1 before 4.1.2, internationalized URLs were subject to a denial of service attack via the locale parameter, which is treated as a regular expression.
Impact
By crafting a Python regex, a vulnerable site could suffer a DOS attack. The attack was most likely to happen on sites that processes locale IDs from URL parameters.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the locale parameter from the URL was passed directly into a regular expression without validation, allowing a crafted pattern to cause excessive backtracking.
Impact
A vulnerable site could suffer a denial of service, most likely on sites that process locale IDs from URL parameters.
What the attacker needed
Site uses internationalised URLs; attacker can send a crafted locale parameter
The fix
The issue affected Django versions before 3.2.16, 4.0.8, and 4.1.2.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A regular expression is a pattern used to match text, and some patterns can take a very long time to process. Django used the locale value from the URL as such a pattern, so a malicious value could make the server work extremely hard. This could slow down or stop the website for other users.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.