# CVE-2026-77401: Zope AccessControl: Information disclosure through Python string `format` and `format_map` functions


- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 16 Sep 2026
- **Updated:** 16 Sep 2026
- **Also known as:** GHSA-pq59-9fq7-m886, PYSEC-2026-4022

## What is CVE-2026-77401?

CVE-2026-77401 is a medium-severity vulnerability in zopefoundation AccessControl, published on 16 Sep 2026. 

### Official description

Zope AccessControl provides a general security framework for use in Zope. Prior to 7.4, applications that allow untrusted users to create and execute AccessControl-controlled Python code do not safely guard str.format and str.format_map when those methods are reached through a str subclass. In both ImplPython.py and cAccessControl.c, Python formatting can recursively access attributes and subscriptions using unrestricted getattr and getitem behavior instead of the policy-restricted getattr and getitem operations. A controlled format string can therefore disclose objects reachable from values available to the formatting operation. This issue is fixed in version 7.4.

Weakness: CWE-693 (Protection Mechanism Failure)

## Which versions are affected by CVE-2026-77401?

3 open source packages ship an affected version, including accesscontrol and AccessControl.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `accesscontrol` | PyPI | All versions | 7.4 |
| `accesscontrol` | PyPI | All versions | 7.4 |
| `AccessControl` | PyPI | All versions | 7.4 |

## How do I fix CVE-2026-77401?

Upgrade accesscontrol to 7.4 or later.

## Is CVE-2026-77401 being exploited?

There is no known exploitation of CVE-2026-77401 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-77401 and fix it if it is affected.

What it is: CVE-2026-77401 is a medium-severity vulnerability in zopefoundation AccessControl, published on 16 Sep 2026. 
Exploitation: There is no known exploitation of CVE-2026-77401 in the wild and no public exploit code.

Affected packages and fixed versions:
- accesscontrol (PyPI): affected all versions; fixed in 7.4
- accesscontrol (PyPI): affected all versions; fixed in 7.4
- AccessControl (PyPI): affected all versions; fixed in 7.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-77401/ (Markdown: https://insights.sbomify.com/CVE-2026-77401/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-77401
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-77401
- OSV: https://osv.dev/vulnerability/CVE-2026-77401

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-77401/
Summaries are generated and may contain mistakes; the official description above is the record.
