# CVE-2021-29434: Improper validation of URLs ('Cross-site Scripting') in Wagtail rich text fields

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.63%, higher than 51% of CVEs (2026-12-01)
- Published: 2021-04-19T18:45:14.000Z
- Modified: 2026-09-10T03:49:26.868Z
- Also known as: GHSA-wq5h-f9p5-q7fx, PYSEC-2021-114
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## Description

Wagtail is a Django content management system. In affected versions of Wagtail, when saving the contents of a rich text field in the admin interface, Wagtail does not apply server-side checks to ensure that link URLs use a valid protocol. A malicious user with access to the admin interface could thus craft a POST request to publish content with `javascript:` URLs containing arbitrary code. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin. See referenced GitHub advisory for additional details, including a workaround. Patched versions have been released as Wagtail 2.11.7 (for the LTS 2.11 branch) and Wagtail 2.12.4 (for the current 2.12 branch).

(As written by CVE List.)

## Affected

- wagtail wagtail: <= 2.11.6; >= 2.12, <= 2.12.3
- wagtail (PyPI): before 2.11.7; from 2.12 before 2.12.4; from 2.11 before 2.11.7; before 2.11.6
- torchbox wagtail: before 2.11.6; from 2.11.0 before 2.11.7; from 2.12.0 before 2.12.4

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 6.1 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

- <https://github.com/wagtail/wagtail/security/advisories/GHSA-wq5h-f9p5-q7fx> (advisory, mitigation, third-party-advisory, web)
- <https://pypi.org/project/wagtail/> (package, product, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-29434> (advisory)
- <https://github.com/wagtail/wagtail/commit/5c7a60977cba478f6a35390ba98cffc2bd41c8a4> (web)
- <https://github.com/wagtail/wagtail/commit/915f6ed2bd7d53154103cc4424a0f18695cdad6c> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/wagtail/PYSEC-2021-114.yaml> (web)
- <https://github.com/wagtail/wagtail> (package)
- <https://github.com/wagtail/wagtail/compare/v2.11.6...v2.11.7> (web)
- <https://pypi.org/project/wagtail> (web)

## Sources

- CVE List: [CVE-2021-29434](https://www.cve.org/CVERecord?id=CVE-2021-29434), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-wq5h-f9p5-q7fx](https://github.com/advisories/GHSA-wq5h-f9p5-q7fx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-29434](https://nvd.nist.gov/vuln/detail/CVE-2021-29434), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-114](https://osv.dev/vulnerability/PYSEC-2021-114), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-29434 · Whole record: https://cve.day/CVE-2021-29434.json · Rebuilt by cve.day 2026-11-25T22:58:00.856Z
