Improper Encoding or Escaping of Output Affecting std/html/template package, versions <1.19.9>=1.20.0-0 <1.20.4


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.25% (48th 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-14548479
  • published6 Jan 2026
  • disclosed5 May 2023
  • creditJuho Nurminen

Introduced: 5 May 2023

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

How to fix?

Upgrade std/html/template to version 1.19.9, 1.20.4 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:
Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized during execution.

CVSS Base Scores

version 4.0
version 3.1