Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:

Expand Down
7 changes: 4 additions & 3 deletions RELEASE-NOTES-0.0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading