CVE-2023-29400: Improper handling of empty HTML attributes in html/template

Published May 7, 2023
·
Updated

Golang Go is vulnerable to HTML injection. A remote attacker could inject malicious HTML code into the templates, which when parsed, would execute in the victim's Web browser within the security context of the hosting site.

Other sources

Improper handling of empty HTML attributes in html/template

Microsoft

Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}") executed with empty input can result in output with unexpected results when parsed due to HTML normalization rules. This may allow injection of arbitrary attributes into tags.

Debian

Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}") executed with empty input could result in output that would have unexpected results when parsed due to HTML normalization rules. This may allow injection of arbitrary attributes into tags.

Red Hat

Affected Software

13 affected componentsFixes available
debian/golang-1.15<=1.15.15-1~deb11u4
debian/golang-1.19<=1.19.8-2
Golang Go<1.19.9
Golang Go>=1.20.0<1.20.4
IBM Concert Software<=1.0.0 - 1.0.1
redhat/golang<1.19.9
1.19.9
redhat/golang<1.20.4
1.20.4
Microsoft cbl2 golang 1.17.13-2
Microsoft cbl2 golang 1.18.8-7
Microsoft cbl2 msft-golang 1.20.7-1
Microsoft cbl2 golang 1.21.6-1
Microsoft azl3 golang 1.20.7-1
Microsoft cbl2 golang 1.20.7-1

Remediation

Event History

May 7, 2023
Data Sourced
via Red Hat·04:43 PM
DescriptionSeverityAffected Software
May 11, 2023
CVE Published
via MITRE·03:29 PM
Data Sourced
via MITRE·03:29 PM
DescriptionWeakness
Oct 14, 2024
Data Sourced
via Ubuntu·01:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·01:16 PM
Description
Oct 21, 2024
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Sep 4, 2025
Data Sourced
via Microsoft·07:39 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:39 AM
Affected Software
Updated
via Microsoft·07:39 AM
DescriptionSeverity

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID of this issue?

The vulnerability ID of this issue is CVE-2023-29400.

2

What is the severity level of CVE-2023-29400?

The severity level of CVE-2023-29400 is high with a score of 7.3.

3

What is the description of CVE-2023-29400?

CVE-2023-29400 is a vulnerability where templates containing actions in unquoted HTML attributes executed with empty input can result in output with unexpected results when parsed due to HTML normalization rules, allowing injection of arbitrary attributes into tags.

4

Which software versions are affected by CVE-2023-29400?

The affected software versions are golang 1.19.9 and golang 1.20.4 (up to exclusive).

5

Are there any references available for CVE-2023-29400?

Yes, you can find references for CVE-2023-29400 at the following links: [link1](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2196474), [link2](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2196475), [link3](https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203