CVE-2026-27136

Invoking duplicate attributes can cause XSS in golang.org/x/net/html

Published May 22, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.

Analysis

AI-generated

Technical impact

An attacker can exploit the golang.org/x/net/html parser by injecting duplicate attributes into HTML input. This causes the parser to build an unexpected tree that retains malicious script elements, allowing the rendered content to execute client‑side code in a victim’s browser.

Affected Systems

The vulnerability affects the golang.org/x/net/html package from the Go standard library. No specific product versions are listed in the CNA data, so any deployment using this package before the fix is potentially impacted. Users must verify the version of the package they are running and upgrade to the latest release once it contains the remediation.

Risk and Exploitability

This exploit requires that an application parse user‑controlled HTML with Render. The CVSS score of 6.1 indicates a moderate severity level for this flaw. The EPSS score of < 1% indicates a very low probability that this vulnerability will be actively exploited in the wild at this time. The inherent risk of XSS remains significant for web applications that rely on this parser for user‑generated content. The likely attack vector is through any form or API that accepts raw HTML input and renders it without additional sanitization. Administrators should assess whether the application exposes a pathway for such input and consider the severity of a potential XSS failure in their environment.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the golang.org/x/net/html package to the latest released version containing the XSS fix
  • Validate or sanitize HTML input to remove duplicate attributes before parsing or rendering
  • Limit the set of allowed tags and attributes in the rendered output or use a dedicated sanitizer that rejects malicious patterns

Generated by OpenCVE AI on May 29, 2026 at 18:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
Weaknesses CWE-1021
CPEs cpe:2.3:a:golang:net:*:*:*:*:*:go:*:*
Type Values Removed Values Added
First Time appeared Golang
Golang net
Vendors & Products Golang
Golang net
Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
Description Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.
Title Invoking duplicate attributes can cause XSS in golang.org/x/net/html
References
Weaknesses
  • CWE-1021

    Improper Restriction of Rendered UI Layers or Frames

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
May 22, 2026, 4:59 PM
Reserved
Feb 17, 2026, 7:57 PM
Status
Analyzed
Published
May 22, 2026, 4:16 PM
Modified
Jul 23, 2026, 4:10 PM