restrictedpython
Affected
- introduced
0, fixed5.4(ecosystem)
Fixed versions
5.4
Fix
- Fixed version
5.4pip install --upgrade restrictedpython==5.4
Advisory
Also known as: CVE-2023-41039, PYSEC-2023-159
Sandbox escape via various forms of "format".
Impact
Python's "format" functionality allows someone controlling the format string to "read" all objects accessible through recursive attribute lookup and subscription from objects he can access. This can lead to critical information disclosure.
With RestrictedPython, the format functionality is available via the format and format_map methods of str (and unicode) (accessed either via the class or its instances) and via string.Formatter.
All known versions of RestrictedPython are vulnerable.
Patches
The issue will be fixed in 5.4 and 6.2.
Workarounds
There are no workarounds to fix the issue without upgrading.
References
For more information
If you have any questions or comments about this advisory:
Credits
Thanks for analysing and reporting the go to:
High Basis: The source's own band: HIGH
0, fixed 5.4 (ecosystem)5.4
5.4pip install --upgrade restrictedpython==5.46.0, fixed 6.2 (ecosystem)6.2
6.2pip install --upgrade restrictedpython==6.2Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0