CVE-2026-77332 in memtomem-stminfo

Summary

by MITRE • 11/20/2026

memtomem-stm is a short-term memory proxy gateway with proactive memory surfacing for AI agents. From 0.1.0 until 0.1.34, untrusted long-term and working-memory fields can introduce Markdown or HTML-compatible structure into the surfaced-memory envelope because those fields are not serialized as inert data. A crafted memory can create misleading structural boundaries or visually conceal surfaced content, affecting how a consuming agent interprets the memory context. Ordinary natural-language persuasion remains a residual model-level risk and is outside the structural serialization flaw. This issue is fixed in version 0.1.34.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/20/2026

The vulnerability identified in memtomem-stm versions prior to 0.1.34 represents a significant security misconfiguration within an AI agent infrastructure component designed for short-term memory proxying and proactive memory surfacing. As a gateway that manages the flow of contextual information between artificial intelligence agents, this software plays a critical role in maintaining state consistency and providing relevant historical data during inference processes. The core architectural flaw lies in the serialization mechanism used to handle long-term and working-memory fields. Instead of treating these inputs as inert text strings requiring strict sanitization or encoding, the system allows untrusted memory content to be processed with minimal structural constraints. This design oversight permits raw Markdown or HTML-compatible syntax to persist within the surfaced-memory envelope that is subsequently consumed by downstream AI agents.

From a technical perspective, this flaw constitutes an injection vulnerability where user-controlled input influences the interpretation of structured data without proper escaping. When an attacker crafts memory entries containing specific markup sequences such as bolding tags, headers, hyperlinks, or HTML div elements, these structures are rendered directly into the context window provided to the AI agent. This behavior deviates from secure coding practices which dictate that all external input must be treated as potentially hostile and encoded appropriately before inclusion in a structured output format. The absence of inert data serialization means that the consuming application interprets the memory content not merely as semantic text but as structural directives, thereby altering the visual or logical presentation of the information being presented to the model.

The operational impact of this vulnerability extends beyond simple display anomalies and touches upon the integrity of the AI agent's decision-making process. By introducing misleading structural boundaries, an attacker can manipulate how the consuming agent parses the context window. For instance, injecting HTML comments or specific Markdown formatting can visually conceal critical instructions or data from human reviewers while still remaining visible to the machine parser, a technique often associated with prompt injection attacks. Furthermore, crafted memory entries can create false contextual cues that mislead the AI into believing certain constraints exist when they do not, or conversely, hide important safety guidelines embedded in previous turns of conversation. This manipulation affects the reliability and trustworthiness of the agent's responses, potentially leading to unauthorized actions if the agent is connected to external tools or APIs based on its interpreted context.

This vulnerability aligns with CWE-79, which covers Improper Neutralization of Input During Web Page Generation commonly known as Cross-Site Scripting, although in this specific AI-centric context it manifests more broadly as a structural injection flaw affecting model interpretation rather than just browser rendering. It also relates to CWE-20 where improper input validation allows malicious data structures to bypass expected parsing logic. In the MITRE ATT&CK framework for AI systems, this behavior facilitates techniques related to Prompt Injection and Context Manipulation, specifically under tactics that involve influencing the system prompt or few-shot examples by injecting trusted-looking but maliciously structured content into memory buffers. The attacker leverages the trust placed in the memory storage mechanism to inject payloads that alter the semantic weight of subsequent interactions.

Mitigation strategies must focus on enforcing strict serialization protocols for all data entering and exiting the memory proxy gateway. Developers should implement a whitelist approach where only plain text is permitted, or alternatively apply rigorous encoding such as HTML entity encoding or Markdown escaping before any content is added to the long-term or working-memory fields. It is essential that the system treats all user-supplied memory entries as untrusted data regardless of their source within the application ecosystem. Upgrading to version 0.1.34 resolves this issue by correcting the serialization logic to ensure that structural characters are neutralized and treated as literal text rather than executable markup. Organizations relying on earlier versions should immediately apply this patch or implement a compensating control at the API gateway level to sanitize memory inputs before they reach the vulnerable component, thereby preventing potential exploitation of this injection vector in production environments.

Responsible

GitHub M

Reservation

08/20/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!