CVE-2023-41039: Sandbox escape via various forms of "format".
8.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.24641%
CWE
Published
8/30/2023
Updated
11/7/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| RestrictedPython | pip | <= 5.3 | 5.4 |
| RestrictedPython | pip | >= 6.0, <= 6.1 | 6.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from three key points:
- The commit modifies Guards.py to block 'format'/'format_map' on str/unicode instances and classes, indicating these methods were previously accessible.
- The Utilities.py patch replaces direct 'string' module access with a delegator that specifically blocks 'Formatter', showing it was previously exposed.
- Test cases demonstrate exploitation via str.format(), str.format_map(), and string.Formatter access. The CWE-74 classification confirms this is an injection vulnerability where format strings act as the injection vector for attribute traversal.