Wagtail: Reflected XSS in dynamic image URL generator view
Severity and exploitation
KEV coverage does not rule out exploitation.
Assessment vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:NSeverity
high7.3CVSS measures technical severity, not the likelihood of an attack.
Known exploitation
Not listed in the checked CISA KEV catalog
Absence from CISA KEV does not rule out attacks.
Public exploit
Not established by this record
Missing evidence does not mean no public exploit exists.
Remediation
Package fixes recorded
Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.
What this means
A reflected cross-site scripting (XSS) vulnerability exists on the dynamic image URL generator view within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could craft a URL that, when viewed by a user with higher privileges, could perform actions with that user's credentials. The vulnerability is present for all sites, even if they do not enable the dynamic image serve view. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Source excerpt · OSVAttack conditions
No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.
Review supporting sources →Affected versions
Check the exact model, release, and any platform requirements against your installation.
Packages
Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.
| Affected range | Recorded fix |
|---|---|
| From 7.3 before 7.3.3Ecosystem versions | 7.3.3 |
| From 7.4 before 7.4.2Ecosystem versions | 7.4.2 |
Version evidence: OSV · GHSA-23m2-mghx-vqmf
View original version evidence (5 explicit versions)
What to do
Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.
Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.
cve.new guidance unless attributed to a publisher. This page does not inspect your installation.
Public exploit evidence
No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.
Original source description
Read the full publisher description
Impact
A reflected cross-site scripting (XSS) vulnerability exists on the dynamic image URL generator view within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could craft a URL that, when viewed by a user with higher privileges, could perform actions with that user's credentials. The vulnerability is present for all sites, even if they do not enable the dynamic image serve view. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Patches
Patched versions have been released as Wagtail 7.3.3 and 7.4.2.
Workarounds
For sites that cannot easily upgrade to a current supported version, the vulnerability can be patched by adding the following code to urls.py URL pattern declarations to override the vulnerable view. This disables the admin dynamic image preview functionality, while the public-facing dynamic image serve view still works.
from django.http import HttpResponseBadRequest
from django.urls import path
from wagtail.admin import urls as wagtailadmin_urls
def disabled_output(request, image_id):
return HttpResponseBadRequest("", content_type="text/plain")
urlpatterns = [
# Example where the CMS admin is at /admin/.
# Add this before the Wagtail admin URLs registration, with the same sub-path.
path("admin/images/<int:image_id>/generate_url/output/", disabled_output),
path("admin/", include(wagtailadmin_urls)),
]
Acknowledgements
Many thanks to Thibaud Colas (@thibaudcolas) for reporting this issue.
For more information
If you have any questions or comments about this advisory:
- Visit Wagtail's support channels
- Email us at security@wagtail.org (view our security policy for more information).
References
6 sourcesInside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
No official CVE record has been imported. Use the source links below for the original advisory.
cve.new JSON →Timeline
All times UTCAdvisory published
Publication date supplied by the source.
Source updated
Latest modification date supplied by the source.
Last imported by cve.new
Latest catalog import, not the date we first saw this advisory.
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.
Related advisories
Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.
Wagtail: Improper restriction handling on Page translation API endpoint
A CMS user with the "submit translations" permission, could use the Admin API's "copy for translation" endpoint to copy an existing page that they do not have edit access to, allowing them to view its contents.
Recorded fixes — wagtail: 7.0.9 or 7.3.4 or 7.4.3 or 8.0rc2. Check your release branch.
Exploitation not established
Wagtail: Improper permission handling when copying snippets
A CMS user with "add" permission over a snippet model, but not "change" or "view" permission, could copy an existing snippet that they do not have access to, allowing them to view its contents.
Recorded fixes — wagtail: 7.0.9 or 7.3.4 or 7.4.3 or 8.0rc2. Check your release branch.
Exploitation not established
Wagtail: Improper restriction handling on descendant collections in Documents and Images API
The Documents and Images API V2 incorrectly listed items in descendants of private collections, which should inherit the view restrictions defined on their ancestors. A user with access to the API could see the filename and name of documents and images in these descendant collections.
Recorded fixes — wagtail: 7.0.9 or 7.3.4 or 7.4.3 or 8.0rc2. Check your release branch.
Exploitation not established
Wagtail: Identification of documents by SHA1 hash
By passing specific HTTP headers to the document serve URL endpoint, an attacker was able to determine whether a document with a given ID matched a specified SHA1 hash, regardless of any permission restrictions on the document or knowing its filename. This could allow an attacker to determine whether a document with a specific known hash is present in the Wagtail document library.
Recorded fixes — wagtail: 7.0.9 or 7.3.4 or 7.4.3 or 8.0rc2. Check your release branch.
Exploitation not established