WAGTAIL · CVE-2026-125105 · Package
FIX → 8.0rc2 · 7.4.3 +2
Passing specific HTTP headers to Wagtail's document serve URL let an attacker check whether a document with a given ID matches a SHA1 hash they already know, without permission checks. The attacker learns only that match result, not the document contents or metadata.
first public Aug 20, 2026 · 1 source
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Sites running Wagtail document libraries are exposed when the document serve endpoint is reachable anonymously and the app uses the default document model with a file_hash attribute. Sites on patched versions, or using a custom document model without file_hash, can skip it. The advisory suggests an interim workaround of stripping If-Match and If-None-Match from anonymous requests to /documents/ at the reverse proxy.
Not affected if auth-required, custom-document-model, patched-version
Who cares python, self-hosted, wagtail
pip show wagtailfile_hash on your document model and whether requests to pass or headers from anonymous usersBy 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.
This vulnerability does not expose the document's contents or any metadata beyond the already known SHA1 hash, and does not expose information about any documents for which the attacker does not know the SHA1 hash.
Patched versions have been released as Wagtail 7.0.9, 7.3.4, 7.4.3 and 8.0rc2.
Site owners who are unable to upgrade can strip If-Match and If-None-Match from anonymous requests to /documents/ at the reverse proxy, or use a custom document model without a file_hash attribute.
Many thanks to Anand Himanshu for reporting this issue.
If you have any questions or comments about this advisory:
Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
/documents/If-MatchIf-None-Match7.0.9, >= 7.1 and below 7.3.4, >= 7.4 and below 7.4.3, and 8.0rc1Upgrade to 8.0rc2 · 7.4.3 +2
7.0.9 for the 7.0 line7.3.4 for the 7.3 line7.4.3 for the 7.4 line8.0rc2 for the 8.0 pre-release lineThis page as .md · .json · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.