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
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ jobs:
# dependencies are required.
run: |
python -m pip install --upgrade pip
python -m pip install "cryptography>=41" "cloudpickle>=2.2"
python -m pip install "cryptography>=41"

- name: Run test suite
run: python -m unittest test.py test_poc_vulnerability.py -v
# Plain `python -m unittest` in every shell: the previous version piped
# through tee with POSIX syntax, which the Windows runners execute with
# PowerShell, so the Windows job failed on the shell rather than on a
# test. Runners print full output on failure, so no log scraping is
# needed here.
run: python run_ci_tests.py
73 changes: 62 additions & 11 deletions README.md

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ We ask that you give us reasonable time to release a fix before any public discl

| Version | Supported |
| :--- | :--- |
| 0.0.6 and later | ✅ Yes |
| 0.0.5 | ⚠️ Known issue — see [GHSA-m85r-gp57-6p5q](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-m85r-gp57-6p5q); upgrade to 0.0.6 |
| 0.0.7 and later | ✅ Yes |
| 0.0.6 | ⚠️ Known critical issue — the `safe_eval()` result is deserialized in the caller (remote code execution); fixed in 0.0.7 |
| 0.0.5 | ⚠️ Known issue — see [GHSA-m85r-gp57-6p5q](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-m85r-gp57-6p5q); upgrade to 0.0.7 |
| 0.0.1 – 0.0.4 | ❌ No — critical sandbox escape, [CVE-2026-133467](https://github.com/Infinitode/CodeSafe/security/advisories/GHSA-7gp8-3j6q-v4h8) |

Only the latest release receives fixes. Please upgrade rather than report issues that may already be fixed.
Expand All @@ -44,14 +45,15 @@ 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 to be assigned · CVE pending | 0.0.6 | 0.0.7 |

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

## Scope notes

CodeSafe contains two very different components, and reports are welcome for both, but keep in mind:

- **`safe_eval()`** is a best-effort sandbox, not a hard security boundary. Reports demonstrating escapes under documented usage are very much in scope. Reports that require you to defeat host-level isolation (containers, seccomp, etc.) are out of scope.
- **`safe_eval()`** is a best-effort sandbox, not a hard security boundary. Reports demonstrating escapes under documented usage are very much in scope. Reports that require you to defeat host-level isolation (containers, seccomp, etc.) are out of scope. Since 0.0.7 the evaluation result is data-only and never deserialized with pickle, so "the result object's `__reduce__` runs in the caller" is no longer reachable; being unable to return lambdas/classes is a documented limitation, not a vulnerability.
- **Encryption** protects code at rest. The built-in default key is public by design; only payloads encrypted with a user-supplied key can be confidential (see [Security Limitations & Notes](README.md#security-limitations--notes)). Reports of integrity/confidentiality failures in the v2 format (wrong key accepted, tampered payload decrypting successfully) are in scope; "the default key is public" is by design, not a vulnerability.

Thank you for helping make CodeSafe safer!
Loading
Loading