CVE-2026-15311: NousResearch hermes-agent XSS in Matrix Adapter

CVE-2026-15311 · Severity: low · CVSS 3.5 · Published 2026-07-10

NousResearch hermes-agent is an AI agent framework. A security vulnerability in its Matrix messaging adapter allows the agent to send messages containing malicious code or hidden links. If a user interacts with these messages through a Matrix chat client, it could lead to unauthorized actions or script execution within their chat application.

Technologies: NousResearch Hermes Agent. Vendors: NousResearch.

Quick answers

Is CVE-2026-15311 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-15311 being exploited in the wild.
How severe is CVE-2026-15311?
Low severity, with a CVSS score of 3.5, published 10 July 2026.
Which products and versions are affected?
NousResearch hermes-agent <= 2026.5.29.2.
Is there a fix for CVE-2026-15311?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-15311 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-15311?
Check whether you run NousResearch Hermes Agent. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A Cross-Site Scripting (XSS) vulnerability exists in the MatrixAdapter._markdown_to_html function within gateway/platforms/matrix.py. The component uses the Python 'markdown' library to convert text to HTML for Matrix 'org.matrix.custom.html' payloads but fails to sanitize the resulting output. This allows raw HTML tags (e.g., <img> with onerror attributes) and dangerous URI schemes (e.g., javascript:, data:, vbscript:) to be included in the 'formatted_body' of outbound messages. While a safer fallback renderer exists, it is bypassed when the 'markdown' package is installed. An attacker with the ability to influence the agent's message content can execute this remotely, potentially leading to XSS in downstream Matrix clients. A patch has been proposed in pull request #42759 but is currently awaiting acceptance.

Affected products

  • NousResearch hermes-agent <= 2026.5.29.2

Timeline

  • 2026-06-09: disclosed: Issue reported on GitHub and fix proposed via PR #42759
  • 2026-07-10: advisory: CVE-2026-15311 published via VulDB/NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.