Skip to content

fix(core,experiments): path traversal in ImageCommand and rand RUSTSEC-2026-0097#2939

Merged
bug-ops merged 3 commits intomainfrom
2937-security-fixes
Apr 13, 2026
Merged

fix(core,experiments): path traversal in ImageCommand and rand RUSTSEC-2026-0097#2939
bug-ops merged 3 commits intomainfrom
2937-security-fixes

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 13, 2026

Summary

Test plan

  • cargo build -p zeph-core -p zeph-experiments passes
  • cargo nextest run -p zeph-experiments --lib — 123 tests pass
  • cargo +nightly fmt --check passes
  • /image /etc/passwd returns Invalid image path: path traversal not allowed
  • cargo deny check advisories no longer reports RUSTSEC-2026-0097

…C-2026-0097

Closes #2937: handle_image_as_string now rejects absolute paths alongside
../traversal sequences, matching the fix applied to the CLI channel in #2933.

Closes #2929: zeph-experiments upgrades from rand 0.8.5 (RUSTSEC-2026-0097,
unsound) to rand 0.10.1 via workspace = true. Updated gen_range -> random_range
(RngExt trait). Removed small_rng feature flag (no longer exists in rand 0.10).
Migrated serde, serde_json, thiserror, and tracing to workspace references.
@bug-ops bug-ops enabled auto-merge (squash) April 13, 2026 10:51
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate dependencies Dependency updates bug Something isn't working size/S Small PR (11-50 lines) labels Apr 13, 2026
Update handle_image_command_missing_file_sends_error to use a relative
path (absolute paths are now rejected before the fs read). Add two new
regression tests: absolute path rejection and parent-dir traversal
rejection in ImageCommand handler.
@github-actions github-actions Bot added size/M Medium PR (51-200 lines) and removed size/S Small PR (11-50 lines) labels Apr 13, 2026
… path

TempDir::new_in(cwd) + strip_prefix(cwd) produces a relative path that
passes the absolute-path traversal guard added in the previous commit.
@bug-ops bug-ops merged commit 7f74872 into main Apr 13, 2026
30 checks passed
@bug-ops bug-ops deleted the 2937-security-fixes branch April 13, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

1 participant