Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-14617

CVE-2026-14617: NousResearch Hermes-Agent RCE Vulnerability

CVE-2026-14617 is a remote code execution vulnerability in NousResearch hermes-agent affecting the streaming reasoning tag filter component. This article covers the technical details, affected versions, and mitigation.

Published:

CVE-2026-14617 Overview

CVE-2026-14617 is a low-severity vulnerability affecting NousResearch hermes-agent versions up to 2026.4.30. The flaw resides in the GatewayStreamConsumer._filter_and_accumulate function within gateway/stream_consumer.py, part of the Streaming Reasoning Tag Filter component. The vulnerability stems from improper handling of case sensitivity [CWE-178] when filtering reasoning tags in streamed output. A remote attacker with low privileges can exploit this weakness, though attack complexity is rated high and exploitability is described as difficult. The maintainers publicly declined to implement a dedicated fix, citing maintenance costs of a duplicated scrub path.

Critical Impact

Remote attackers can bypass the streaming reasoning tag filter by manipulating character case, potentially leaking model reasoning content that the filter is designed to scrub.

Affected Products

  • NousResearch hermes-agent up to and including version 2026.4.30
  • Component: Streaming Reasoning Tag Filter (gateway/stream_consumer.py)
  • Function: GatewayStreamConsumer._filter_and_accumulate

Discovery Timeline

  • 2026-07-03 - CVE-2026-14617 published to NVD
  • 2026-07-06 - Last updated in NVD database

Technical Details for CVE-2026-14617

Vulnerability Analysis

The vulnerability exists in the streaming filter logic of hermes-agent, an AI agent framework by NousResearch. The _filter_and_accumulate method inside GatewayStreamConsumer is responsible for identifying and scrubbing reasoning tags from streamed model output before delivery to downstream consumers. The filter performs matching without normalizing character case. This allows tag variants that differ only in capitalization to bypass the scrub path and appear in the accumulated stream buffer.

The weakness is classified under [CWE-178] (Improper Handling of Case Sensitivity). Public disclosure includes a proof-of-concept gist and a VulDB entry, but no active exploitation has been reported.

Root Cause

The root cause is a string comparison in the tag filter that treats tokens as case-sensitive. Reasoning tags emitted by the underlying model may vary in case depending on decoding paths or adversarial prompt shaping. When the filter compares incoming tokens against an expected literal tag, mismatched casing skips the sanitization branch and content passes through the accumulator unfiltered.

Attack Vector

An authenticated remote attacker submits crafted prompts or manipulates streamed content so that reasoning tags are emitted in a case variant unrecognized by the filter. The attacker requires low privileges on the gateway and network access to the streaming endpoint. Exploitation is described as difficult because it depends on influencing model output to produce non-canonical tag casing. The vulnerability manifests during streamed response processing; see the GitHub Gist PoC for the demonstration provided by the reporter.

No verified exploit code is provided here. Refer to the VulDB entry for CVE-2026-14617 for further technical detail.

Detection Methods for CVE-2026-14617

Indicators of Compromise

  • Streamed responses from hermes-agent gateways containing reasoning tag fragments (for example, mixed-case variants of expected reasoning delimiters) that should have been scrubbed.
  • Gateway logs showing prompts that repeatedly probe tag boundary handling or attempt to shape model output casing.

Detection Strategies

  • Inspect outbound streaming responses from hermes-agent for leaked reasoning tag content that bypassed the filter.
  • Add a post-processing validation step that performs case-insensitive matching against known reasoning tag literals and flags occurrences downstream of _filter_and_accumulate.
  • Correlate anomalous prompt patterns with responses that contain unexpected internal reasoning artifacts.

Monitoring Recommendations

  • Enable verbose logging on the gateway stream consumer to capture pre- and post-filter buffers during high-risk sessions.
  • Track EPSS and public exploit availability for CVE-2026-14617; current EPSS probability is approximately 0.237%.
  • Monitor the hermes-agent GitHub repository and Issue #27288 for any changes to maintainer guidance.

How to Mitigate CVE-2026-14617

Immediate Actions Required

  • Deploy a downstream sanitizer that performs case-insensitive matching on reasoning tags before responses reach end users or logs.
  • Restrict gateway access to authenticated, trusted clients and apply least-privilege controls on API tokens used to invoke hermes-agent.
  • Review prior streamed outputs for evidence of leaked reasoning content and treat leaked material as sensitive.

Patch Information

The maintainers of hermes-agent have publicly declined to implement a dedicated fix. Their stated reason, captured in the pull request comment, is that the duplicated scrub path exceeds the maintenance cost threshold. No official patch is available. Operators must rely on compensating controls.

Workarounds

  • Wrap or subclass GatewayStreamConsumer._filter_and_accumulate in a local fork to normalize casing before tag comparison.
  • Insert a middleware layer that performs case-insensitive regex scrubbing of reasoning tags on all outbound streams.
  • Constrain model decoding parameters to reduce the likelihood of non-canonical tag casing in generated output.
bash
# Configuration example: case-insensitive tag scrub applied as middleware
# Pseudocode - adapt to your gateway deployment
export HERMES_POSTFILTER_REGEX='(?i)<\/?reasoning>'
export HERMES_POSTFILTER_MODE='strip'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.