CVE-2026-15311
Received Received - Intake

Cross-Site Scripting in NousResearch Hermes-Agent

Vulnerability report for CVE-2026-15311, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-10

Last updated on: 2026-07-10

Assigner: VulDB

Description

A vulnerability was identified in NousResearch hermes-agent up to 2026.5.29.2. Affected by this issue is the function MatrixAdapter._markdown_to_html of the file gateway/platforms/matrix.py of the component Matrix Adapter. Such manipulation leads to cross site scripting. The attack can be executed remotely. The exploit is publicly available and might be used. The pull request to fix this issue awaits acceptance.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-10
Last Modified
2026-07-10
Generated
2026-07-10
AI Q&A
2026-07-10
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
nousresearch hermes_agent 2026.5.29.2

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-15311 is a cross-site scripting (XSS) vulnerability in the Hermes Agent's Matrix adapter, specifically in the function that converts Markdown to HTML for outbound Matrix messages.

The vulnerability arises because the Matrix adapter uses the Python markdown library to render Markdown into HTML without properly sanitizing the output. This allows attacker-controlled Markdown content to include raw HTML and dangerous URL schemes such as javascript:, data:, or vbscript:.

As a result, malicious payloads like <img src=x onerror="alert(1)"> or links with javascript: URLs can be injected into the formatted_body field of Matrix messages, which downstream clients may render and execute, leading to script injection risks.

The issue affects Hermes Agent versions up to and including 2026.5.29.2, and the exploit is publicly available.

Impact Analysis

This vulnerability can lead to cross-site scripting attacks when malicious Markdown content is sent through the Hermes Agent's Matrix adapter.

If you use the affected Hermes Agent versions, attackers can inject malicious scripts or dangerous links into Matrix messages that may be executed by downstream clients that trust or insufficiently sanitize these messages.

Such script execution can lead to unauthorized actions, data theft, session hijacking, or other malicious activities within the context of the affected Matrix clients.

The attack can be executed remotely and requires only that the attacker send specially crafted Markdown content.

Detection Guidance

This vulnerability involves unsafe rendering of attacker-controlled Markdown to HTML in the Hermes Agent's Matrix adapter, which can lead to cross-site scripting (XSS) via malicious payloads in Matrix messages.

To detect this vulnerability on your system or network, you should monitor outbound Matrix messages for suspicious HTML content or dangerous URL schemes such as "javascript:", "data:", or "vbscript:" embedded in the formatted_body field.

Commands to help detect potential exploitation might include searching logs or message payloads for suspicious patterns. For example, using grep on log files or message dumps:

  • grep -r -i -E 'javascript:|data:|vbscript:' /path/to/matrix/messages/logs
  • grep -r -i '<img src=x onerror=' /path/to/matrix/messages/logs

Additionally, inspecting the formatted_body fields in Matrix messages for raw HTML tags or suspicious links can help identify exploitation attempts.

Mitigation Strategies

Immediate mitigation steps include applying available patches or updates that fix the vulnerability by sanitizing the Markdown to HTML conversion process.

If a patch is not yet accepted or available, consider using the fallback markdown renderer (_markdown_to_html_fallback) which sanitizes dangerous HTML and URL schemes, instead of the vulnerable markdown library.

Additionally, monitor and filter outbound Matrix messages to block or sanitize any suspicious HTML or dangerous URL schemes before they reach clients.

Implementing or enabling the new _MatrixHTMLSanitizer class, as described in the fix, will help strip dangerous tags and attributes, and prevent XSS attacks.

Until the fix is applied, restrict user privileges to limit the ability to send potentially malicious markdown content.

Compliance Impact

The vulnerability allows cross-site scripting (XSS) attacks through unsafe Markdown rendering in outbound Matrix messages, which can lead to the injection of malicious scripts in downstream clients.

Such XSS vulnerabilities can potentially lead to unauthorized access or exposure of sensitive information if exploited, which may impact compliance with data protection regulations like GDPR or HIPAA that require safeguarding personal and sensitive data.

However, the provided information does not explicitly state the direct impact on compliance with these standards or regulations.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-15311. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart