إرسال #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)
ارسال24/04/2026 02:35 PM (1 شهر منذ)
الاعتدال23/05/2026 11:19 AM (29 days later)
الحالةتمت الموافقة
إدخال VulDB365314 [NousResearch hermes-agent حتى 2026.4.16 read_file Tool tools/file_tools.py _is_blocked_device اجتياز الدليل]
النقاط20

Want to know what is going to be exploited?

We predict KEV entries!