GO-2021-0239

Source
https://pkg.go.dev/vuln/GO-2021-0239
Import Source
https://vuln.go.dev/ID/GO-2021-0239.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2021-0239
Aliases
Published
2022-02-17T17:33:35Z
Modified
2024-05-20T16:03:47Z
Summary
Improper sanitization when resolving values from DNS in net
Details

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.

References
Credits
    • Philipp Jeitner
    • Haya Shulman from Fraunhofer SIT

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.15.13
Introduced
1.16.0-0
Fixed
1.16.5

Ecosystem specific

{
    "imports": [
        {
            "path": "net",
            "symbols": [
                "Resolver.LookupAddr",
                "Resolver.LookupCNAME",
                "Resolver.LookupMX",
                "Resolver.LookupNS",
                "Resolver.LookupSRV"
            ]
        }
    ]
}