diff --git a/README.md b/README.md index 972b0d3..a5a1a34 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ An open-source Python library for code encryption, decryption, and safe evaluati | `safe_eval` sandbox escape via indirect subscript call | CVE-2026-133467 · [GHSA-7gp8-3j6q-v4h8](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-7gp8-3j6q-v4h8) | 0.0.1 - 0.0.4 | 0.0.5 | | `safe_eval` sandbox escape via dunder attribute access with `allow_attributes=True` (string-argument indirection, e.g. `().__getattribute__('__class__')`) | [GHSA-m85r-gp57-6p5q](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-m85r-gp57-6p5q) · CVE pending | 0.0.3 - 0.0.5 | **0.0.6** | | Remote code execution in the calling process via unsafe deserialization of the `safe_eval()` result (cloudpickle) | [GHSA-2565-87hp-2588](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-2565-87hp-2588) · CVE pending | 0.0.6 | **0.0.7** | +| `safe_eval` attribute/key disclosure via `str.format` replacement fields (`allow_attributes=True`) | [GHSA-h6v8-q8xm-2cvq](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-h6v8-q8xm-2cvq) · CVE pending | 0.0.3 - 0.0.6 | **0.0.7** | You can browse all advisories at https://github.com/Infinitode/CodeSafe/security/advisories @@ -63,7 +64,7 @@ You can browse all advisories at https://github.com/Infinitode/CodeSafe/security - **Fixed in**: Version **0.0.7** - every `str.format`/`format_map` template is now inspected, and any replacement field naming an attribute or a key is rejected. Plain fields (`'{}'`, `'{0:>3}'`, `'{name}'`) still work, nested spec fields are unwrapped and checked, and non-literal templates (built with concatenation, `join` or `chr()`) are rejected because they cannot be inspected. - **Workaround for older versions**: leave `allow_attributes` at its default (`False`), and do not pass secret-bearing objects through `allowed_vars`/`allowed_builtins`. Otherwise, upgrade. -**Credit**: Reported by [@stilwel](https://github.com/stilwel) - thank you for the clear write-up. +**Advisory**: [GHSA-h6v8-q8xm-2cvq](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-h6v8-q8xm-2cvq). Reported by [@stilwel](https://github.com/stilwel) - thank you for the clear write-up. ### Critical Vulnerability Fixed in v0.0.5 @@ -143,7 +144,7 @@ python -m unittest test.py test_poc_vulnerability.py -v * **Changed**: The `cloudpickle` dependency was removed - CodeSafe no longer imports pickle on the evaluation path at all. * Added regression tests for every item above (see [Vulnerability & Security Testing](#vulnerability--security-testing-test_poc_vulnerabilitypy)). * **Credit**: The critical result-deserialization issue above was reported by **Juan Lucas Armendares** of **Sunplace Solutions** - many thanks. See [GHSA-2565-87hp-2588](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-2565-87hp-2588). -* **Credit**: The `str.format` replacement-field traversal (`'{0.__class__}'.format(obj)` and similar) was reported by [@stilwel](https://github.com/stilwel) - many thanks. +* **Credit**: The `str.format` replacement-field traversal (`'{0.__class__}'.format(obj)` and similar) was reported by [@stilwel](https://github.com/stilwel) - many thanks. See [GHSA-h6v8-q8xm-2cvq](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-h6v8-q8xm-2cvq). ### Changelog v0.0.6: diff --git a/RELEASE-NOTES-0.0.8.md b/RELEASE-NOTES-0.0.8.md index 84f1c8c..dc090df 100644 --- a/RELEASE-NOTES-0.0.8.md +++ b/RELEASE-NOTES-0.0.8.md @@ -13,7 +13,7 @@ so the reporters can be told exactly when their credit becomes visible there. - **Juan Lucas Armendares** of **Sunplace Solutions** - reported the result-deserialization RCE (GHSA-2565-87hp-2588). - **[@stilwel](https://github.com/stilwel)** - reported the `str.format` - replacement-field traversal. + replacement-field traversal (GHSA-h6v8-q8xm-2cvq). Both were added to the README after the 0.0.7 upload. They are already visible on GitHub in the [Security Advisory](README.md#security-advisory) section and @@ -23,8 +23,9 @@ the v0.0.7 changelog. - The `str.format` replacement-field traversal section (affected 0.0.3 - 0.0.6, fixed 0.0.7) and its advisory link. -- The GHSA ID `GHSA-2565-87hp-2588` replacing the "GHSA to be assigned" - placeholder in the advisory table. +- The GHSA IDs `GHSA-2565-87hp-2588` and `GHSA-h6v8-q8xm-2cvq` replacing the + "GHSA to be assigned" / "advisory pending" placeholders in the advisory + table. - The `SECURITY.md` note documenting the email reporting fallback, and the request to check spam for replies. diff --git a/SECURITY.md b/SECURITY.md index ab7129d..c73bb00 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -46,7 +46,7 @@ Only the latest release receives fixes. Please upgrade rather than report issues | `safe_eval` sandbox escape via indirect subscript call | CVE-2026-133467 · [GHSA-7gp8-3j6q-v4h8](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-7gp8-3j6q-v4h8) | 0.0.1 - 0.0.4 | 0.0.5 | | `safe_eval` sandbox escape via dunder attribute string-argument (`allow_attributes=True`) | [GHSA-m85r-gp57-6p5q](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-m85r-gp57-6p5q) · CVE pending | 0.0.3 - 0.0.5 | 0.0.6 | | Remote code execution in the calling process via unsafe deserialization of the `safe_eval()` result | [GHSA-2565-87hp-2588](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-2565-87hp-2588) · CVE pending | 0.0.6 | 0.0.7 | -| `safe_eval` attribute/key disclosure via `str.format` replacement fields (`allow_attributes=True`) | [GHSA-2565-87hp-2588](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-2565-87hp-2588) · advisory pending | 0.0.3 - 0.0.6 | 0.0.7 | +| `safe_eval` attribute/key disclosure via `str.format` replacement fields (`allow_attributes=True`) | [GHSA-h6v8-q8xm-2cvq](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-h6v8-q8xm-2cvq) · CVE pending | 0.0.3 - 0.0.6 | 0.0.7 | See https://github.com/Infinitode/CodeSafe/security/advisories for the canonical list.