Improper Encoding or Escaping of Output Affecting std/html/template package, versions <1.20.8>=1.21.0-0 <1.21.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.1% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Encoding or Escaping of Output vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-STDHTMLTEMPLATE-14548478
  • published6 Jan 2026
  • disclosed7 Sept 2023
  • creditTakeshi Kaneko

Introduced: 7 Sep 2023

CVE-2023-39318  (opens in a new tab)
CWE-116  (opens in a new tab)

How to fix?

Upgrade std/html/template to version 1.20.8, 1.21.1 or higher.

Overview

std/html/template is a Go standard library package std/html/template

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output.

Go Vulnerability Report:
The html/template package does not properly handle HTML-like "" comment tokens, nor hashbang "#!" comment tokens, in

CVSS Base Scores

version 4.0
version 3.1