Sep 18, 2026·4 min read·29 visits
Unauthenticated or low-privilege users can inject the "{{/html}}" sequence to escape HTML macro scopes and run arbitrary code on the host OS via privileged script macros.
CVE-2025-53837 is a critical remote code execution (RCE) vulnerability in XWiki Rendering before versions 14.10.2 and 15.0 RC1. The vulnerability arises from a failure to escape macro closing tags within raw output handled by HTML macro blocks. This allows low-privilege users to escape the restricted HTML container and execute high-privilege scripts under the application's context.
XWiki is a highly extensible, Java-based enterprise wiki platform that supports advanced scripting and rendering. At the core of its platform is the XWiki Rendering engine, a framework responsible for translating multiple input syntaxes (such as XWiki 2.1, Markdown, or HTML) into output formats like XHTML. A key design element of XWiki is its support for nested macros, which are dynamic blocks that execute code, format content, or interface with internal services. Among these, the HTML macro allows users to embed raw HTML components within standard wiki pages.
The vulnerability, identified as CVE-2025-53837, resides in how XWiki processes raw output inside the HTML macro context. When executing with the configuration wiki="true", the HTML macro processes dynamic evaluations within an isolated container. However, the system's underlying rendering handler failed to properly escape macro delimiters when outputting raw data. This omission exposes a vulnerability class known as Eval Injection (CWE-95) combined with Output Escaping Failure (CWE-116).
The practical security boundary breached here is the rendering sandbox. In XWiki, page editors can customize certain profile sections or document pages. If a low-privilege user can modify any page that gets executed or viewed under a highly privileged context, they can leverage this rendering vulnerability to elevate privileges. When the system processes the user-supplied content containing macro closing sequences, it breaks the macro boundaries and executes subsequent script elements with system-level authorization.
The root cause of CVE-2025-53837 lies within the XHTMLWikiPrinter class, which is a key component of the XWiki Rendering library. This class handles the construction of XHTML tags and manages raw output when generating serialized wiki streams. When an HTML macro is invoked with the parameter wiki="true", the content inside the macro is analyzed and converted. To achieve direct output without double-encoding standard HTML structures, the engine invokes printRaw(String) to output raw text segments to the final rendering channel.
Prior to the resolution of this vulnerability, the printRaw method implemented in XHTMLWikiPrinter did not examine the contents of the raw buffer for active macro delimiters. The exact structure used to terminate an HTML macro block is the sequence {{/html}}. Because the renderer treated raw input as trustable structural content, any literal sequence matching {{/html}} injected into a raw string was output directly to the stream. This directly terminated the parser's active HTML macro block ahead of schedule.
Once the HTML macro container is prematurely terminated, the parser transitions back to interpreting standard wiki syntax. Any syntax elements following the injected {{/html}} sequence are parsed outside the HTML macro. Crucially, if this rendering process occurs on pages with programming rights—such as standard user profile pages or administrative views—the parser executes arbitrary macro blocks located after the fake termination. An attacker can append administrative scripting macros, such as {{groovy}} or {{python}}, which run code outside of the typical sandboxed environment. This architectural flaw converts a simple content-rendering step into an unrestricted execution vector.
An examination of the vulnerable implementation versus the patched implementation demonstrates how the boundary leak was closed. In the vulnerable version, XHTMLWikiPrinter.java implemented the printRaw(String) method with a direct pass-through to its parent class. This class failed to scan for the macro delimiter sequence {{/html}}, allowing raw text to influence the parser's structural boundaries.
// Vulnerable Implementation
public void printRaw(String raw)
{
// Triggers space handling before starting elements
handleSpaceWhenStartElement();
// Passes the raw string directly to the parent printer without validation
super.printRaw(raw);
}The fix, introduced in commit 92bc8095ed3acce15ab200c8525e1623b4898be5, introduces structured validation and replacement rules inside printRaw(String) to prevent context-escape attempts. It sanitizes the direct sequence and also prevents boundary-spanning injection techniques.
// Patched Implementation in XHTMLWikiPrinter.java
public void printRaw(String raw)
{
handleSpaceWhenStartElement();
// First-stage fix: Escape any direct occurrences of the closing tag
// By replacing "{\| Attribute | Detail |
|---|---|
| Improproper Input Validation | An issue was discovered in NETGEAR R6080 routers through 1.0.0.46. The login.cgi and upgrade.cgi pages and multiple dynamic parameters (such as formUsername, hidden_sysPassword, sysPassword, save_reboot, and select_country) are vulnerable to buffer overflow. An attacker can hijack a stack variable and crash the system or execute arbitrary code with admin privileges by writing over boundary limits of variables. |
CVE-2026-118777 is a prototype pollution vulnerability (CWE-1321) in the Forge JavaScript cryptography and networking library (distributed on npm as node-forge) prior to version 1.4.1. The flaw resides in the forge.http client subsystem, where incoming HTTP cookie names and paths parsed from Set-Cookie response headers are stored directly into standard JavaScript objects without key validation or property isolation. By returning crafted Set-Cookie headers containing keys such as __proto__ or constructor, a malicious HTTP server can inject arbitrary properties into Object.prototype, attach attributes to the global Object constructor, or delete built-in prototype methods to cause an application-wide denial of service.
CVE-2026-118775 (GHSA-4642-5mcj-2rqw) is an integer overflow and validation flaw in the ASN.1 serialization module of Forge (node-forge) prior to version 1.4.1. The asn1.oidToDer() function fails to validate the range of the first two arcs of an Object Identifier (OID) and truncates the packed initial subidentifier to a single 8-bit integer. Applications that perform policy checks on untrusted OID strings before encoding them into Distinguished Encoding Rules (DER) format can be tricked into emitting DER bytes that correspond to a completely different, restricted OID.
CVE-2026-119194 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting versions 0.3.3 through 0.6.4. The flaw resides in the schemaless decoding routine ConstructedPayloadDecoderBase._decodeComponentsSchemaless used across BER, CER, and DER codecs. By sending an ASN.1 container populated with child components whose tag identifiers are separated by multiples of CPython's integer hash modulus (sys.hash_info.modulus), an unauthenticated attacker can force worst-case hash collisions in an unbounded Python set, degrading decoding performance from O(N) to O(N^2) and causing a Denial of Service (DoS).
CVE-2026-119195 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting all versions prior to 0.6.5. When decoding constructed strings or indefinite-length ANY types across BER, CER, and certain DER code paths, the payload decoders repeatedly concatenate incoming fragments onto an immutable bytes object using the += operator. Because Python bytes objects cannot be resized in-place, each fragment iteration allocates a new buffer and copies all previously accumulated bytes, resulting in quadratic O(N^2) time and memory copy complexity. An unauthenticated remote attacker can supply a highly fragmented ASN.1 stream to exhaust CPU cycles and stall application worker threads.
An algorithmic complexity vulnerability (CWE-407) in pyasn1 versions prior to 0.6.5 allows unauthenticated attackers to cause a Denial of Service (DoS) via crafted ASN.1 payloads. The flaw resides in the binary-encoded ASN.1 REAL mantissa deserialization routine within RealPayloadDecoder.valueDecoder. By performing iterative byte-string slicing and repeated bitwise shifts on a growing arbitrary-precision integer, the decoder exhibits quadratic time and memory allocation complexity relative to the mantissa length. Supplying a BER-, CER-, or DER-encoded payload with a large REAL mantissa causes excessive CPU consumption and blocks application worker processes.
A vulnerability classified under CWE-407 (Inefficient Algorithmic Complexity) exists in the pyasn1 library prior to version 0.6.5. When parsing constructed ASN.1 BIT STRING payloads under BER, CER, or schema-driven DER encoding rules, the BitStringPayloadDecoder repeatedly shifts and copies the entire accumulated bit value for each incoming fragment. Processing inputs with a large number of small constructed fragments induces quadratic CPU consumption, allowing unauthenticated remote attackers to cause a denial of service via resource exhaustion during the initial decoding phase.