# Regular expression denial-of-service in Django

Advisory record · `GHSA-vm8q-m57g-pff3`

- **Identifiers:** `GHSA-vm8q-m57g-pff3` · `BIT-django-2024-27351` · `CVE-2024-27351` · `PYSEC-2024-47`
- **State:** Confirmed
- **Severity:** CVSS 5.3 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-1333](https://cwe.mitre.org/data/definitions/1333.html)
- **Tags:** [Denial of service](https://agentprime.io/advisories/tag/dos.md)
- **Published:** 15 Mar 2024
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 15 Mar 2024, 21:30 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `django` (PyPI): affected `>=3.2, <3.2.25 || >=4.2, <4.2.11 || >=5.0, <5.0.3`; fixed in `3.2.25`, `4.2.11`, `5.0.3`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Django versions 3.2 before 3.2.25, 4.2 before 4.2.11, and 5.0 before 5.0.3 are vulnerable to a regular expression denial-of-service. The Truncator.words() method with html=True and the truncatewords_html template filter can be slowed down by a crafted string. Upgrade to Django 3.2.25, 4.2.11, 5.0.3 or later.

Written 5 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 5.3 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H`, from GitHub Advisory Database

- **CISA KEV:** Not listed.
- **EPSS:** 0.019, the 79th percentile, on 18 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:35 UTC: First seen by agentprime
- 31 Oct 2026, 14:35 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-vm8q-m57g-pff3)

## Sources

- [GitHub Advisory Database: GHSA-vm8q-m57g-pff3](https://github.com/advisories/GHSA-vm8q-m57g-pff3)
- [OSV: GHSA-vm8q-m57g-pff3](https://osv.dev/vulnerability/GHSA-vm8q-m57g-pff3)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-27351>
- <https://github.com/django/django/commit/072963e4c4d0b3a7a8c5412bc0c7d27d1a9c3521>
- <https://github.com/django/django/commit/3394fc6132436eca89e997083bae9985fb7e761e>
- <https://github.com/django/django/commit/3c9a2771cc80821e041b16eb36c1c37af5349d4a>
- <https://docs.djangoproject.com/en/5.0/releases/security>
- <https://github.com/django/django>
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-47.yaml>
- <https://groups.google.com/forum/#%21forum/django-announce>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/D2JIRXEDP4ZET5KFMAPPYSK663Q52NEX>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SN2PLJGYSAAG5KUVIUFJYKD3BLQ4OSN6>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4D>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/D2JIRXEDP4ZET5KFMAPPYSK663Q52NEX>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-vm8q-m57g-pff3>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-vm8q-m57g-pff3/>. Everything for agents: <https://agentprime.io/llms.txt>.
