GO-2022-0515

Source
https://pkg.go.dev/vuln/GO-2022-0515
Import Source
https://vuln.go.dev/ID/GO-2022-0515.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-0515
Aliases
Published
2022-07-20T17:01:45Z
Modified
2024-05-20T16:03:47Z
Summary
Stack exhaustion due to deeply nested types in go/parser
Details

Calling any of the Parse functions on Go source code which contains deeply nested types or declarations can cause a panic due to stack exhaustion.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2022-0515"
}
References
Credits
    • Juho Nurminen of Mattermost

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.17.12
Introduced
1.18.0-0
Fixed
1.18.4

Ecosystem specific

{
    "imports": [
        {
            "path": "go/parser",
            "symbols": [
                "ParseExprFrom",
                "ParseFile",
                "parser.parseBinaryExpr",
                "parser.parseIfStmt",
                "parser.parsePrimaryExpr",
                "parser.parseStmt",
                "parser.parseUnaryExpr",
                "parser.tryIdentOrType",
                "resolver.closeScope",
                "resolver.openScope"
            ]
        }
    ]
}