CVE-2023-41050
JSON

6.8medium

Information disclosure through Python's "format" functionality in Zope AccessControl

Severity
6.8medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.64% (higher than 52% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8xv7-89vj-q48cPYSEC-2026-2075PYSEC-2026-2325

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.

Affected

Product or packageVersionsReported by
zopefoundation AccessControlAccessControl: < 4.4, AccessControl: >= 5.0, < 5.8, AccessControl: >= 6.0, < 6.2, Zope: < 4.8.9, Zope: >= 5.0.0, < 5.8.4CVE List
accesscontrol (PyPI)before 4.4, from 5.0 before 5.8, from 6.0 before 6.2GitHub Advisory Database, PyPA Advisory Database
zope (PyPI)before 4.8.9, from 5.0.0 before 5.8.4GitHub Advisory Database, PyPA Advisory Database
zope accesscontrolbefore 4.4, from 5.0 before 5.8, from 6.0 before 6.2NVD
zope zopebefore 4.8.9, from 5.0 before 5.8.4NVD

All scores

GitHub_M6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
GitHub6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
NVD7.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
PyPA Advisory Database6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N

Classification

CWE-200

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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.

Patches

A fix will be introduced in the versions 4.4, 5.8 and 6.2.

Workarounds

There are no workarounds.

References

https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-xjw2-6jm9-rf67 describes the corresponding problem for RestrictedPython.

NVD (es)

AccessControl proporciona un marco de seguridad general para su uso en Zope. La funcionalidad "format" de Python permite que alguien que controle la cadena de formato "lea" objetos accesibles (recursivamente) mediante acceso a atributos y suscripción desde objetos accesibles. Esos accesos a atributos y suscripciones utilizan las variantes `getattr` y `getitem` completas de Python, no las variantes `_getattr_` y `_getitem_` restringidas por políticas de `AccessControl`. Esto puede conducir a la divulgación de información crítica. `AccessControl` ya proporciona una variante segura para `str.format` y niega el acceso a `string.Formatter`. Sin embargo, `str.format_map` todavía no es seguro. Los afectados son todos los usuarios que permiten a usuarios no confiables crear código Python controlado por `AccessControl` y ejecutarlo. Se ha introducido una solución en las versiones 4.4, 5.8 y 6.2. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-41050 changed 2024-09-26CVE Terms of Use
GitHub Advisory DatabaseGHSA-8xv7-89vj-q48c changed 2026-07-13CC-BY-4.0
NVDCVE-2023-41050 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-2075 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-2325 changed 2026-07-13CC-BY-4.0