Shell injection via newlines in session env snapshots

NousResearch/hermes-agent · cluster 71296 · environments

Data as of

Nothing open on GitHub. Fix merged in #72355. Check it covers your case.

The short answer

0open issues
0open PRs
7items grouped
Known?
Yes. 7 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #72355. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #72355. That is separate from the fix event.
Still open
Nothing open on GitHub.

A bug allows newlines in chat metadata or environment variables to execute shell commands through session snapshots. Multiple fix attempts address sanitizing or filtering multiline content in the snapshot pipeline.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #72355 fix(environments): stop multiline session env from becoming shell via snapshot (salvage of #71306 by @HexLab98)

    merged to main

    files: tests/tools/test_snapshot_multiline_session_env_injection.py, tests/tools/test_snapshot_session_id_leak.py, tools/environments/base.py

5 PRs closed without merging

From the close comments: done elsewhere 2 · closed without comment 1 · merged via another change 1 · superseded by another PR 1

  • #71306 fix(environments): stop multiline session env from becoming shell via snapshot · merged via another change → #72355
  • #71356 fix(security): sanitize newlines in chat metadata to prevent shell injection via env snapshot · superseded by another PR → #71306, #71296, #71309
  • #71414 fix(terminal): filter multiline continuation lines in env snapshot (#71296) · done elsewhere → 9677495
  • #71464 fix(terminal): prevent session snapshot injection · done elsewhere → 6290cd0, #71296
  • #71974 fix(tools): harden session-snapshot filter against multiline injection (#71296) · closed without comment
Closed issues · 1
  • Closed#71296[Bug]: Newline in a Matrix room/display name runs shell commands on the gateway host
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.29: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
environments
Merged PRs
#72355
Closed issues
1
Attempts
5 PRs closed without merging
Fix link checked
27 Jul 2026

For your agent

The same facts, typed.