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.79% (52nd 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 IDSNYK-GOLANG-STDHTMLTEMPLATE-14548480
  • published6 Jan 2026
  • disclosed7 Sept 2023
  • creditTakeshi Kaneko

Introduced: 7 Sep 2023

CVE-2023-39319  (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 apply the proper rules for handling occurrences of "<script", "<!--", and "</script" within JS literals in

CVSS Base Scores

version 4.0
version 3.1