CVE-2026-10618
Last modified
CVE-2026-10618 is a medium-severity vulnerability rated 5.4/10 on the CVSS scale. Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. EPSS estimates a 0.21% chance of exploitation in the next 30 days.
Description
Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.
Metrics
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Gohugo | Hugo | >= 0.93.0, < 0.165.0 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-10618?
How severe is CVE-2026-10618?
How do I fix CVE-2026-10618?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-106173A improper limitation of a pathname to a restricted director…9.8
- CVE-2026-106174A improper locking vulnerability in Fortinet FortiOS 8.0.0, …7.5
- CVE-2026-106175A Double Free vulnerability [CWE-415] vulnerability in Forti…2.3
- CVE-2026-106176A missing authorization vulnerability in Fortinet FortiSIEM …3.8
- CVE-2026-106177A kernel buffer overflow vulnerability in HP Sure Click vers…6.4
- CVE-2026-106179UI misrepresentation in WebAppInstalls in Google Chrome prio…5.4
- CVE-2026-106180Observable discrepancy in Animation in Google Chrome prior t…3.1
- CVE-2026-106181Incorrect reference resolution in DevTools in Google Chrome …5.3
- CVE-2026-106182UI misrepresentation in Paint in Google Chrome prior to 155.…5.4
- CVE-2026-106183Missing authorization in Chromoting in Google Chrome on on W…5.9
- CVE-2026-106184Uninitialized resource in Media in Google Chrome prior to 15…4.3
- CVE-2026-106185Improper input validation in Viz in Google Chrome prior to 1…6.5
Are you affected by CVE-2026-10618?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
