Vulnerability · Published Apr 19, 2021 · Assigned by GitHub_M
CVE-2021-29434Improper validation of URLs ('Cross-site Scripting') in Wagtail rich text fields
Medium 6.1
In plain English
A medium-severity cross-site scripting in wagtail from wagtail. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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).
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | wagtail | 2.11.7 | GHSA-wq5h-f9p5-q7fx |
| PyPI | wagtail | 2.12.4 | GHSA-wq5h-f9p5-q7fx |
| PyPI | wagtail | 2.11.6, 2.11.7, 2.12.4 | PYSEC-2021-114 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
References
- https://github.com/wagtail/wagtail/security/advisories/GHSA-wq5h-f9p5-q7fx x_refsource_CONFIRM
- https://pypi.org/project/wagtail/ x_refsource_MISC