GHSA-c2xx-cjmh-9q8f
Wagtail: Improper restriction handling on descendant collections in Documents and Images API
- Severity
- 5.3 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- —
- No score published
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-280 Improper Handling of Insufficient Permissions or Privileges
- Fix
7.0.9- Upgrade wagtail to this version or later
Description
Impact
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.
Patches
Patched versions have been released as Wagtail 7.0.9, 7.3.4, 7.4.3 and 8.0rc2.
Workarounds
Site owners using Wagtail's API can avoid the vulnerability by adding authentication to the Documents and Images APIs.
Acknowledgements
Many thanks to Ta Duc Thien 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).
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| wagtail | < 7.0.9 |
7.0.9 |
| wagtail | >= 7.1, < 7.3.4 |
7.3.4 |
| wagtail | >= 7.4, < 7.4.3 |
7.4.3 |
| wagtail | >= 8.0rc1, < 8.0rc2 |
8.0rc2 |
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.9
- pip
pip install --upgrade "wagtail>=7.0.9"- poetry
poetry add "wagtail>=7.0.9"- uv
uv add "wagtail>=7.0.9"
Severity breakdown
CVSS 3.1 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- 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
Packages
Other links
Timeline
- Published
- Last updated by the source
Related advisories
| Advisory | Severity | Why 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-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 |
| GHSA-f2p5-j6fg-5cxf Wagtail: Denial of service via unbounded filter specs in the image preview | Low | Also affects wagtail |
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