提交 #812214: NousResearch hermes-agent 2026.4.16 Path Traversal (CWE-22)信息

标题NousResearch hermes-agent 2026.4.16 Path Traversal (CWE-22)
描述# 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.
来源⚠️ https://gist.github.com/YLChen-007/1d1aeff404cb88e06ec2fb3377f49fef
用户
 Eric-h (UID 97582)
提交2026-04-24 14時35分 (2 月前)
管理2026-05-23 11時19分 (29 days later)
状态已接受
VulDB条目365314 [NousResearch hermes-agent 直到 2026.4.16 read_file Tool tools/file_tools.py _is_blocked_device 目录遍历]
积分20

Interested in the pricing of exploits?

See the underground prices here!