GO-2021-0239

Improper sanitization when resolving values from DNS in net

At a glance

Published
Updated
CVE
CVE-2021-33195
Aliases
BIT-golang-2021-33195

Description

The LookupCNAME, LookupSRV, LookupMX, LookupNS, and LookupAddr functions and their respective methods on the Resolver type may return arbitrary values retrieved from DNS which do not follow the established RFC 1035 rules for domain names. If these names are used without further sanitization, for instance unsafely included in HTML, they may allow for injection of unexpected content. Note that LookupTXT may still return arbitrary values that could require sanitization before further use.

Affected packages

PackageVersions
Go · stdlibintroduced 0, fixed 1.15.13, introduced 1.16.0-0, fixed 1.16.5

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database