Submit #812214: NousResearch hermes-agent 2026.4.16 Path Traversal (CWE-22)info

TitelNousResearch hermes-agent 2026.4.16 Path Traversal (CWE-22)
Beschreibung# Technical Details A Denial of Service via device path blocklist bypass exists in the `_is_blocked_device()` method in `tools/file_tools.py` of hermes-agent. The application fails to adequately normalize file paths (missing `os.path.normpath`), only using `os.path.expanduser()` before checking against an exact string match blocklist (`_BLOCKED_DEVICE_PATHS`), allowing bypass using standard UNIX path traversal sequences (e.g., `/dev/./zero`). # Vulnerable Code File: tools/file_tools.py Method: _is_blocked_device() Why: The function normalizes the input path using only `os.path.expanduser(filepath)` without resolving traversal components (`.` or `..`). The hardcoded blocklist uses exact membership matching, meaning an input like `/dev/./zero` does not match `/dev/zero`, but the OS kernel transparently resolves it, leading to blocked device access. # Reproduction 1. Deploy `hermes-agent` with the default file toolset enabled. 2. Send a prompt to the agent: `Please use the read_file tool to read the file at path '/dev/./zero'`. 3. The `os.path.expanduser()` will bypass the blocklist, the device file is opened, and the read_file tool will initiate an infinite read. 4. The agent process hangs indefinitely. # Impact - Denial of Service (DoS) resulting in the agent session freezing permanently. - In gateway modes, repeated attempts can exhaust thread pools, causing complete service denial for all users.
Quelle⚠️ https://gist.github.com/YLChen-007/1d1aeff404cb88e06ec2fb3377f49fef
Benutzer
 Eric-h (UID 97582)
Einreichung24.04.2026 14:35 (vor 1 Monat)
Moderieren23.05.2026 11:19 (29 days later)
StatusAkzeptiert
VulDB Eintrag365314 [NousResearch hermes-agent bis 2026.4.16 read_file Tool tools/file_tools.py _is_blocked_device Directory Traversal]
Punkte20

Do you know our Splunk app?

Download it now for free!