Skip to content

Commit f87a7e6

Browse files
Merge pull request #11 from Infinitode/arena/390295bd-codesafe
docs: link GHSA-h6v8-q8xm-2cvq
2 parents 641b1e5 + a9e6854 commit f87a7e6

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ An open-source Python library for code encryption, decryption, and safe evaluati
2424
| `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 |
2525
| `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** |
2626
| 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** |
27+
| `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** |
2728

2829
You can browse all advisories at https://github.com/Infinitode/CodeSafe/security/advisories
2930

@@ -63,7 +64,7 @@ You can browse all advisories at https://github.com/Infinitode/CodeSafe/security
6364
- **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.
6465
- **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.
6566

66-
**Credit**: Reported by [@stilwel](https://github.com/stilwel) - thank you for the clear write-up.
67+
**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.
6768

6869
### Critical Vulnerability Fixed in v0.0.5
6970

@@ -143,7 +144,7 @@ python -m unittest test.py test_poc_vulnerability.py -v
143144
* **Changed**: The `cloudpickle` dependency was removed - CodeSafe no longer imports pickle on the evaluation path at all.
144145
* Added regression tests for every item above (see [Vulnerability & Security Testing](#vulnerability--security-testing-test_poc_vulnerabilitypy)).
145146
* **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).
146-
* **Credit**: The `str.format` replacement-field traversal (`'{0.__class__}'.format(obj)` and similar) was reported by [@stilwel](https://github.com/stilwel) - many thanks.
147+
* **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).
147148

148149
### Changelog v0.0.6:
149150

‎RELEASE-NOTES-0.0.8.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ so the reporters can be told exactly when their credit becomes visible there.
1313
- **Juan Lucas Armendares** of **Sunplace Solutions** - reported the
1414
result-deserialization RCE (GHSA-2565-87hp-2588).
1515
- **[@stilwel](https://github.com/stilwel)** - reported the `str.format`
16-
replacement-field traversal.
16+
replacement-field traversal (GHSA-h6v8-q8xm-2cvq).
1717

1818
Both were added to the README after the 0.0.7 upload. They are already visible
1919
on GitHub in the [Security Advisory](README.md#security-advisory) section and
@@ -23,8 +23,9 @@ the v0.0.7 changelog.
2323

2424
- The `str.format` replacement-field traversal section (affected 0.0.3 - 0.0.6,
2525
fixed 0.0.7) and its advisory link.
26-
- The GHSA ID `GHSA-2565-87hp-2588` replacing the "GHSA to be assigned"
27-
placeholder in the advisory table.
26+
- The GHSA IDs `GHSA-2565-87hp-2588` and `GHSA-h6v8-q8xm-2cvq` replacing the
27+
"GHSA to be assigned" / "advisory pending" placeholders in the advisory
28+
table.
2829
- The `SECURITY.md` note documenting the email reporting fallback, and the
2930
request to check spam for replies.
3031

‎SECURITY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Only the latest release receives fixes. Please upgrade rather than report issues
4646
| `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 |
4747
| `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 |
4848
| 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 |
49-
| `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 |
49+
| `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 |
5050

5151
See https://github.com/Infinitode/CodeSafe/security/advisories for the canonical list.
5252

0 commit comments

Comments
 (0)