CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-GJ48-438W-JH9V

GHSA-GJ48-438W-JH9V: Client-Side HTML Sanitization Bypass in Bleach

Alon Barad
Alon Barad
Software Engineer

Jun 16, 2026·6 min read·56 visits

Executive Summary (TL;DR)

Bleach fails to sanitize the formaction attribute, permitting submit-triggered XSS when explicitly allowed in configurations.

A client-side HTML sanitization bypass vulnerability exists in the Bleach library where the formaction attribute is not recognized as a URI. This allows attackers to inject javascript: URIs when formaction is on the allowed list, resulting in Cross-Site Scripting (XSS).

Vulnerability Overview

The HTML sanitization library Bleach is widely used within the Python ecosystem to clean untrusted markup. By leveraging a whitelist of allowed tags, attributes, and URI protocols, Bleach filters inputs to prevent Cross-Site Scripting (XSS) attacks. Security researchers discovered that Bleach fails to sanitize the formaction attribute, which can contain dangerous URI schemes such as javascript:. This vulnerability affects all versions of Bleach prior to 6.4.0.\n\nApplications that explicitly allow the formaction attribute on submit-capable elements are vulnerable. The formaction attribute is used on elements like <button>, <input type="submit">, or <input type="image"> to specify where to send the form-data when the form is submitted. Because Bleach does not check the protocol of the URI in this attribute, attackers can inject arbitrary script execution vectors.\n\nThis flaw represents a client-side HTML sanitization bypass. When a victim interacts with the sanitized but malicious element, the browser executes the payload. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and CWE-116 (Improper Encoding or Escaping of Output).

Root Cause Analysis

The root cause of this vulnerability lies in the sanitization pipeline implemented by Bleach, which wraps the html5lib library. The html5lib parser decomposes an HTML fragment into tokens, which are then passed through a series of filters. During this process, attributes that are designated to contain URIs must be validated and sanitized. This verification is performed by matching attribute names against a static list of known URI attributes.\n\nIn Bleach's vendorized filter codebase, specifically within bleach/sanitizer.py and its dependencies in html5lib, a set named attr_val_is_uri defines these attributes. This set historically included standard URI-bearing attributes such as action, href, src, and poster. However, the formaction attribute was omitted from this list. As a result, the library did not route the value of formaction through its protocol-checking functions.\n\nBrowsers treat the formaction attribute as a direct replacement for the form's action URL when the triggering element is clicked. Under the HTML5 specification, if an element has a formaction attribute, that value overrides the action attribute of the parent <form>. Since the browser processes this attribute as a URI, it permits pseudo-protocols like javascript:. Bleach's failure to recognize formaction as a URI attribute allowed these dangerous schemes to persist in the sanitized output.\n\nmermaid\ngraph LR\n A['Untrusted HTML'] --> B['Bleach.clean()']\n B --> C{'Is attribute in attr_val_is_uri?'}\n C -- 'Yes' --> D['sanitize_uri() validation']\n C -- 'No' --> E['Preserve original value']\n E --> F['Client-Side DOM Execution']\n

Code Analysis

To understand the technical gap, we must examine how Bleach identifies URI-containing attributes. In bleach/_vendor/html5lib/filters/sanitizer.py, the set attr_val_is_uri is defined statically. When the sanitizer filter iterates over token attributes, it checks if the attribute namespace and name exist within this set. If a match is found, the filter invokes sanitize_uri() to strip unauthorized schemes.\n\nThe vulnerable code implementation did not include (None, 'formaction') in this mapping:\n\npython\n# Vulnerable configuration in bleach/_vendor/html5lib/filters/sanitizer.py\nattr_val_is_uri = {\n (None, 'action'),\n (None, 'href'),\n (None, 'src'),\n (None, 'poster'),\n # The (None, 'formaction') entry was missing here\n}\n\n\nThe security patch added (None, 'formaction') to the attr_val_is_uri set. This single-line correction ensures that whenever the sanitizer encounters formaction, it treats the value as a URI and executes the validation routine. The patched code is structured as follows:\n\npython\n# Patched configuration in bleach/_vendor/html5lib/filters/sanitizer.py\nattr_val_is_uri = {\n (None, 'action'),\n (None, 'href'),\n (None, 'src'),\n (None, 'poster'),\n (None, 'formaction'), # Added to ensure protocol verification\n}\n\n\nWhen formaction is processed with this patch in place, the sanitize_uri function parses the value. If the scheme does not match the configured list of allowed protocols (typically http, https, and mailto), the attribute is either stripped or neutralized. This prevents the preservation of javascript: payloads.

Exploitation Methodology

Exploitation of this vulnerability requires that the target application meets specific configuration prerequisites. The developer must have explicitly configured Bleach to allow the formaction attribute on submit-capable tags. Additionally, the application must allow elements like <button> or <input> to be submitted. If these conditions are met, the attack vector can be delivered through any untrusted user input field.\n\nAn attacker can construct a payload using a <button> element nested inside a <form> tag. The button is assigned a formaction attribute containing a malicious payload such as javascript:alert(document.cookie). When Bleach processes this HTML fragment, it validates the <button> and <form> tags against the whitelist but ignores the payload inside the formaction attribute because it is treated as a plain text string.\n\nhtml\n<!-- Vulnerable payload after sanitization -->\n<form>\n <button formaction="javascript:alert(document.cookie)">Submit</button>\n</form>\n\n\nOnce the sanitized payload is rendered in the victim's browser, it appears as a standard button. When the user clicks the button, the browser attempts to submit the form to the URL specified in the formaction attribute. Because the URL is a javascript: pseudo-protocol, the browser executes the script in the context of the vulnerable application's origin, allowing session hijacking or credential theft.

Impact Assessment

The security impact of this vulnerability is client-side code execution under the origin of the hosting application. Successful exploitation results in Cross-Site Scripting (XSS). This allows an attacker to execute arbitrary script code within the victim's browser session, bypassing the Same-Origin Policy.\n\nWith active script execution, an attacker can access sensitive information stored in the browser. This includes session tokens, cookies, and local storage data. If the application does not utilize HttpOnly flags on session cookies, the attacker can exfiltrate these credentials to a controlled remote server. Furthermore, the attacker can perform unauthorized actions on behalf of the authenticated user, such as modifying account settings or initiating state-changing requests.\n\nThe Common Vulnerability Scoring System (CVSS) v3.1 assigns a score of 6.1 to this vulnerability. This medium-severity rating reflects that while the attack vector is network-based and requires no privileges, it depends on user interaction. The security scope is changed because the execution environment shifts from the backend data handler to the browser's DOM context.

Remediation and Long-Term Strategy

The primary remediation step is upgrading Bleach to version 6.4.0, which includes the missing entry in the URI attribute list. This update immediately resolves the sanitization bypass by subjecting the formaction attribute to the same protocol validation as other URI fields. However, developers must be aware of the long-term maintenance status of the Bleach library.\n\nMozilla formally deprecated Bleach and archived the repository. Version 6.4.0 is the final maintenance release of the project, meaning that no future security vulnerabilities or operational defects will be resolved by the maintainers. Consequently, continuing to rely on Bleach introduces long-term operational risk as new browser behaviors or security bypasses emerge.\n\nTo mitigate this risk, security teams should plan to migrate to supported alternatives. Libraries such as nh3, a Python binding to the Rust-based ammonia HTML sanitizer, provide actively maintained and high-performance alternatives. For temporary mitigation where upgrades cannot be immediately applied, developers must audit Bleach configurations and remove formaction from the list of allowed attributes.

Technical Appendix

CVSS Score
6.1/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected Systems

Bleach (PyPI Package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
bleach
Mozilla
< 6.4.06.4.0
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork (AV:N)
CVSS Score6.1
ImpactClient-Side Code Execution (XSS)
Exploit StatusPoC
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controlled input before it is placed in output that is used as a web page that is served to other users.

Vulnerability Timeline

Mozilla officially announces the deprecation of Bleach due to its reliance on html5lib
2023-01-23
Release of Bleach v6.4.0 which patches the formaction sanitization gap
2026-06-05
GitHub Advisory Database publishes security advisory GHSA-gj48-438w-jh9v
2026-06-16

References & Sources

  • [1]Official GitHub Security Advisory
  • [2]Mozilla Bleach GitHub Repository
  • [3]Mozilla Bleach v6.4.0 Release Page
  • [4]Mozilla Bleach Deprecation Statement
  • [5]GitHub Advisory Database Catalog Link

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 9 hours ago•GHSA-M3QR-FVP4-78XJ
5.3

GHSA-m3qr-fvp4-78xj: Authentication Bypass and Log Disclosure in Basekick Labs Arc

GHSA-m3qr-fvp4-78xj is an authentication bypass and information disclosure vulnerability in Arc, an open-source, SQL-native time-series database developed by Basekick Labs and written in Go. Due to an improper route registration sequence within the Go Fiber HTTP server initialization pipeline, the application registered the /api/v1/logs endpoint prior to mounting the global authentication middleware. Because Fiber evaluates route handlers in strict declaration order and terminates request traversal when a handler returns without invoking c.Next(), unauthenticated remote callers can query the logs endpoint and retrieve up to 10,000 buffered operational log entries even when authentication is enabled.

Alon Barad
Alon Barad
5 views•8 min read
•about 10 hours ago•CVE-2026-62848
7.3

CVE-2026-62848: Local Arbitrary Code Execution via Unsafe Deserialization in Metalama Named Pipe IPC

CVE-2026-62848 (GHSA-h26j-4vp7-x9w2) is a high-severity unsafe deserialization vulnerability in Metalama, a Roslyn-based meta-programming and code generation framework for C#. The flaw resides in the inter-process communication (IPC) channel used by Metalama within Microsoft Visual Studio. Across versions 2023.0 through 2026.1.18, the framework utilized either Newtonsoft.Json with TypeNameHandling.All or MessagePack with TypelessObjectResolver over local Windows named pipes without enforcing a strict type allow-list. Because the named pipes use predictable identifiers, any local process running under the same Windows user session can connect to the endpoint and transmit crafted serialized payloads, resulting in arbitrary Common Language Runtime (CLR) type instantiation and code execution within the host Visual Studio process.

Alon Barad
Alon Barad
8 views•9 min read
•about 11 hours ago•GHSA-9PPR-WFW9-XVR2
5.3

GHSA-9ppr-wfw9-xvr2: DNS Cache TTL Manipulation Failure in Netfoil via Go Value-Copy Range Iteration

A logic flaw in github.com/tinfoil-factory/netfoil versions 0.3.0 through 0.6.0 prevents the DNS proxy from properly decrementing Time-To-Live (TTL) values on cached DNS responses and enforcing configured maximum TTL limits. Due to an idiomatic Go programming mistake where a range loop modifies value copies of slice elements rather than the underlying slice array, netfoil continually serves DNS answers with their original static TTLs. This condition causes downstream clients and resolvers to retain stale DNS records beyond their intended expiration window and bypasses local MaxTTL administrative policies.

Alon Barad
Alon Barad
6 views•10 min read
•about 12 hours ago•CVE-2026-11800
8.1

CVE-2026-11800: Authentication Bypass via JWT Algorithm Confusion in Keycloak

A cryptographic signature verification flaw in Keycloak's OAuth 2.0 JWT Authorization Grant flow (RFC 7523) and federated client authentication mechanisms allows algorithm confusion between asymmetric and symmetric signing algorithms. Authenticated clients can sign forged JWT assertions using HMAC-SHA256 (HS256) with an Identity Provider's public key bytes acting as the symmetric secret. Keycloak processes the public key material as an HMAC secret key, validating the forged assertion and issuing unauthorized access tokens for federated users.

Alon Barad
Alon Barad
8 views•10 min read
•about 13 hours ago•CVE-2026-62331
8.2

CVE-2026-62331: Path Traversal and Stored Instruction Injection in Praktor Telegram File Uploads

CVE-2026-62331 is a high-severity path traversal vulnerability (CWE-22) affecting Praktor versions prior to 0.9.1. Praktor is a multi-agent Claude Code orchestrator that integrates Telegram message handling with isolated Docker container workspaces. Due to improper sanitization of user-controlled filenames during Telegram document uploads, a remote user can escape the designated uploads directory and overwrite arbitrary files within the persistent agent workspace volume. Because the default configuration permits messages from any Telegram user without authentication, an attacker can overwrite critical agent instruction files such as CLAUDE.md, achieving persistent prompt and instruction injection across subsequent agent executions.

Alon Barad
Alon Barad
5 views•9 min read
•about 14 hours ago•GHSA-P3JP-9V83-76W9
8.1

CVE-2026-111497 / GHSA-p3jp-9v83-76w9: Out-of-Bounds Heap Write in Microsoft .NET Brotli Decoder

CVE-2026-111497 (tracked as GHSA-p3jp-9v83-76w9) is an out-of-bounds heap write vulnerability in the native Google Brotli decompression library bundled within the Microsoft .NET runtime. The flaw occurs during the parsing of malformed block-switch sequences in compressed bitstreams when the fast execution path discards validation return statuses. Unauthenticated attackers delivering crafted Brotli payloads to applications configured to decompress untrusted streams can trigger memory corruption, resulting in denial of service, information disclosure, or arbitrary code execution.

Alon Barad
Alon Barad
6 views•11 min read