CVE-2023-29400: stdlib - Improper Handling of Empty HTML Attributes

golang-1.15 Updated 02 Oct 2025

Summary

11/05/2023
N/A
No i
High
7.3

CVE-2023-29400: Templates containing actions in unquoted HTML attributes (e.g. Affects golang-1.15 versions < 484330d038d060c6e4db3dc8e6ea2b811b2a44d8. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The stdlib package is a part of the Go programming language and provides a collection of standard libraries for various functionalities. It includes modules for file I/O, networking, cryptography, and more. The package is widely used in Go applications and forms the foundation of many projects. However, a vulnerability has been discovered in the package's html/template module, which can lead to improper handling of empty HTML attributes.

Vulnerability Detail

The vulnerability in the stdlib package's html/template module arises from the improper handling of actions in unquoted HTML attributes when executed with empty input. This can result in unexpected output when the templates are parsed due to HTML normalization rules. Attackers can exploit this vulnerability to inject arbitrary attributes into HTML tags, potentially leading to cross-site scripting (XSS) attacks or other security breaches. The vulnerability has a CVSS score of 7.3, indicating a high severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, developers can mitigate the risk by carefully reviewing and validating user input before using it in templates. It is essential to sanitize and escape any user-generated content to prevent potential injection attacks. Implementing a robust input validation mechanism can help minimize the impact of this vulnerability.

Conclusion

The stdlib package's html/template module is vulnerable to improper handling of empty HTML attributes, which can lead to injection of arbitrary attributes into HTML tags. This can result in cross-site scripting (XSS) attacks or other security breaches. It is crucial for developers to update the stdlib package to the fixed versions and review and update any affected templates. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for golang-1.15 →

Share this vulnerability

FAQ

The vulnerability allows attackers to inject arbitrary attributes into HTML tags, potentially leading to cross-site scripting (XSS) attacks or other security breaches.

The vulnerability affects stdlib package versions 1.18.2 and prior.

At the time of this report, there are no known exploits for this vulnerability. However, it is crucial to apply the recommended fixes to prevent potential attacks.

Yes, the CVSS score for this vulnerability is 7.3, indicating a high severity level.

You can find more information about this vulnerability in the National Vulnerability Database (NVD) entry: https://nvd.nist.gov/vuln/detail/CVE-2023-29400

Related vulnerabilities

Recent vulnerabilities recorded for golang-1.15.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback