CVE-2026-39823
Medium · 6.1CVSS
6.1
EPSS
0.3%
Published
May 7, 2026
CISA due date
—
Cloudanix analysis
Some Go-based websites may let a malicious link run unwanted code in a visitor's browser if the site places specially crafted URL text into page metadata.
- Exploitation
- Requires User Interaction
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This is a cross-site scripting weakness in Go's HTML escaping behavior for URLs rendered inside a <meta> tag's content attribute. When attacker-controlled URL content includes ASCII whitespace around an equals sign, the contextual escaper may fail to escape the value correctly, allowing the browser to reinterpret part of the value as markup or script-capable content. The practical impact is execution of attacker-supplied JavaScript in a victim's browser when the victim visits a vulnerable page or follows a crafted link. The CVSS score is 6.1, indicating moderate severity: exploitation is network-accessible and low complexity, but typically requires user interaction and primarily affects confidentiality and integrity rather than service availability.
Why it matters to the business
If an application built with affected Go components renders untrusted URL data into meta tags, attackers may be able to run script in users' browsers. This can lead to stolen session tokens, fraudulent actions performed as the user, phishing within a trusted site, or manipulation of page content. The issue is not listed in CISA KEV, is not associated with ransomware use, has no known mature public exploit in the provided data, and has a low, stable EPSS score, so it is not currently a top mass-exploitation signal; however, internet-facing applications that reflect user-controlled URLs should still be reviewed and remediated because XSS flaws are commonly easy to weaponize once a vulnerable rendering path is found.
How an attack unfolds
An attacker first identifies a page in a Go-based application that places URL-derived or otherwise user-controlled input into a <meta> tag's content attribute, such as metadata used for redirects, previews, canonical links, or social sharing. The attacker then crafts a URL value containing ASCII whitespace around an equals sign and combines it with XSS syntax intended to survive the flawed escaping behavior. The victim is lured to the crafted URL or to content that causes the vulnerable template to render. When the browser parses the generated HTML, the malformed escaping allows attacker-controlled content to be interpreted in an executable context. The injected JavaScript then executes with the origin privileges of the vulnerable site, enabling actions such as reading accessible page data, stealing tokens not protected by HttpOnly, altering page content, or issuing authenticated requests as the victim.
How to fix it
Upgrade affected Go toolchains, standard-library components, or downstream packages when the vendor publishes fixed versions for this issue. Because no fixed versions were provided in the input, track the official Go security advisory and update to the first patched release available for the affected branch. Rebuild and redeploy applications after upgrading; updating the toolchain alone is insufficient if deployed binaries are not rebuilt. As defense-in-depth, avoid placing untrusted data directly into <meta content="..."> attributes, strictly validate URL inputs, allow only expected schemes such as https, reject control characters and unusual whitespace in URL fields, and use explicit attribute-safe encoding where templating is unavoidable. Add or strengthen Content Security Policy to reduce XSS impact, especially by disallowing inline script where feasible and using nonces or hashes for approved scripts.
How to confirm the fix worked
Inventory Go versions used in build pipelines and deployed binaries with commands such as go version, go version -m <binary>, SBOM tooling, or container image inspection. Run govulncheck against source and built artifacts once the vulnerability is available in the Go vulnerability database. Review templates and rendered HTML for <meta> tags whose content attribute is populated from request parameters, stored user content, redirect URLs, canonical URLs, Open Graph fields, or similar untrusted sources. Confirm that patched builds no longer render attacker-controlled URL content in a way that can introduce new attributes, tags, event handlers, javascript: URLs, or script elements. Use regression tests with payloads containing spaces, tabs, carriage returns, and line feeds around equals signs to verify that output is safely escaped or rejected.
Typical attack path
- Find a Go-based application endpoint that reflects or stores user-controlled URL-like input.
- Confirm the input is rendered inside a <meta> tag's content attribute.
- Craft a payload that places ASCII whitespace around an equals sign inside the URL content and appends XSS syntax.
- Deliver the crafted link or content to a victim through email, chat, search indexing, social sharing, or another user-driven workflow.
- Victim opens the affected page, causing the server to render the vulnerable meta tag.
- The browser parses the response and executes attacker-controlled JavaScript in the vulnerable site's origin.
- Attacker uses the script execution to steal accessible data, perform user actions, or pivot into additional application abuse.
How to detect it
Historical exploitation detection is difficult because successful XSS often leaves only the initial malicious request in server-side logs and execution occurs in the victim's browser. Review HTTP access logs, CDN logs, WAF events, reverse-proxy logs, application request logs, and CSP violation reports for requests to pages that render meta tags using user-controlled URL parameters. Focus on parameters containing URL-encoded or literal ASCII whitespace around equals signs, especially when combined with script tags, event-handler attributes, javascript: URIs, SVG payloads, iframe/object tags, or encoded angle brackets and quotes. Inspect referrer logs and stored content fields for malicious URLs that may have been rendered to multiple users. If CSP reporting is enabled, look for blocked inline script, blocked javascript: navigation, or unexpected script execution reports associated with metadata-rendering pages. For confirmed suspicious requests, correlate affected user sessions, authentication events, state-changing actions, and unusual API activity immediately after the page view.
- %20=%20
- %09=%09
- %0a=%0a
- %0d=%0d
- <script
- %3Cscript
- </script>
- %3C%2Fscript%3E
- javascript:
- javascript%3A
- onerror=
- onload=
- onclick=
- %20onerror%3D
- %20onload%3D
- %3Csvg
- <svg
- %3Ciframe
- <iframe
- document.cookie
- localStorage
- sessionStorage
- alert(
- prompt(
- confirm(
- <meta
- content=
What your security team should do
- Prioritize internet-facing Go applications that reflect or store user-controlled URLs and render HTML metadata.
- Track the official Go advisory and apply the first patched Go release or package version as soon as it is available, then rebuild and redeploy affected binaries.
- Search codebases for <meta> tags with dynamic content attributes and review whether the values can be influenced by users or external feeds.
- Add targeted tests for whitespace-around-equals XSS payloads in HTML meta content contexts.
- Deploy or tune Content Security Policy to limit script execution impact while remediation is underway.
- Monitor web, WAF, CDN, CSP violation, and application logs for suspicious URL parameters containing encoded whitespace around equals signs combined with XSS primitives.
- Treat confirmed exploitation as a session-integrity incident: invalidate exposed sessions, review account actions, and investigate downstream browser-side data exposure.
The record
CVE-2026-27142 fixed a vulnerability in which URLs were not correctly escaped inside of a <meta> tag's <content> attribute. If the URL content were to insert ASCII whitespaces around the '=' rune inside of the <content> attribute, the escaper would fail to similarly escape it, leading to XSS.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| openSUSE:Tumbleweed | go1.25 | 0 | 1.25.10-1.1 |
| openSUSE:Tumbleweed | go1.26 | 0 | 1.26.3-1.1 |
Related vulnerabilities
- CVE-2026-42507 When returning errors, functions in the net/textproto package would include its input as… Also affects go1.25
- CVE-2026-42504 Decoding a maliciously-crafted MIME header containing many invalid encoded-words can… Also affects go1.25
- CVE-2026-27145 (*x509.Certificate).VerifyHostname previously called matchHostnames in a loop over all… Also affects go1.25
- CVE-2026-42501 A malicious module proxy can exploit a flaw in the go command's validation of module… Also affects go1.25
- CVE-2026-42499 Pathological inputs could cause DoS through consumePhrase when parsing an email address… Also affects go1.25
- CVE-2026-39819 The "go bug" command writes to two files with predictable names in the system temporary… Also affects go1.25
- CVE-2026-39820 Well-crafted inputs reaching ParseAddress, ParseAddressList, and ParseDate were able to… Also affects go1.25
- CVE-2026-39826 If a trusted template author were to write a tag containing an empty 'type' attribute or… Also affects go1.25