Skip to content

GHSA-h54r-xq46-qwqm CVE-2026-54259 PYSEC-2026-612

Wagtail: Improper restriction handling on Documents and Images chosen endpoints

Medium PyPI
Severity
4.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.27%
Chance of exploitation in the next 30 days. Higher than 19.28% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-280 Improper Handling of Insufficient Permissions or Privileges
Fix
7.0.8
Upgrade wagtail to this version or later

Description

Impact

The Documents and Images chooser's chosen endpoint incorrectly listed items for which the user has not been granted choose permission. A user with access to the Wagtail admin could see the filename and name and URLs of documents and images in those collections.

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.0.8, 7.3.3, 7.4.2.

Workarounds

N/A

Acknowledgements

Many thanks to @harshakshit for reporting this issue.

For more information

If you have any questions or comments about this advisory:

Affected versions

PyPI

PackageVulnerableFixed in
wagtail
< 7.0.8
7.0.8
wagtail
>= 7.1, < 7.3.3
7.3.3
wagtail
>= 7.4, < 7.4.2
7.4.2
wagtail
< 7.0.8
>= 7.1, < 7.3.3
>= 7.4, < 7.4.2
7.0.8
7.3.3
7.4.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

wagtail PyPI → 7.0.8

pip
pip install --upgrade "wagtail>=7.0.8"
poetry
poetry add "wagtail>=7.0.8"
uv
uv add "wagtail>=7.0.8"

Severity breakdown

CVSS 3.1 4.3

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Weakness

CWE-280: Improper Handling of Insufficient Permissions or Privileges

The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected code paths that may leave the product in an invalid state.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation: Always check to see if you have successfully accessed a resource or system functionality, and use proper error handling if it is unsuccessful. Do this even when you are operating in a highly privileged mode, because errors or environmental conditions might still cause a failure. For example, environments with highly granular permissions/privilege models, such as Windows or Linux capabilities, can cause unexpected failures.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-jm5p-837g-rv8g
Wagtail: Improper restriction handling on Page translation API endpoint
Medium Also affects wagtail
GHSA-x5cx-w6p2-mxf2
Wagtail: Improper permission handling when copying snippets
Medium Also affects wagtail
GHSA-c2xx-cjmh-9q8f
Wagtail: Improper restriction handling on descendant collections in Documents and Images API
Medium Also affects wagtail
GHSA-92hv-j533-69wc
Wagtail: Identification of documents by SHA1 hash
Low Also affects wagtail
GHSA-3vrh-m9w7-v94f
Wagtail: Improper restriction handling on Pages admin API
Medium Also affects wagtail
GHSA-23m2-mghx-vqmf
Wagtail: Reflected XSS in dynamic image URL generator view
High Also affects wagtail
GHSA-8634-mr4j-r72c
Wagtail: Pages translations can be created without page permissions when using simple_translation
Medium Also affects wagtail
GHSA-r6p4-grq7-xm4m
Wagtail: Improper permission handling in image preview
Medium Also affects wagtail
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor