WS-2026-0063
Published:July 19, 2026
Updated:September 08, 2026
Uncontrolled recursion in the ordered-JSON support of github.com/go-openapi/swag/jsonutils. Both the marshal and unmarshal paths of the stdlib and easyjson adapters recurse once per nesting level with no depth limit, so a deeply nested JSON document, or an equally deep in-memory JSONMapSlice passed to WriteJSON, drives the Go runtime to a non-recoverable "fatal error: stack overflow" and kills the process. The ordered-JSON path uses its own lexer instead of encoding/json and so does not benefit from the standard library decoder max-nesting-depth guard. Fixed in v0.27.1, which bounds nesting at 10000 levels. The same unbounded recursion is present in the pre-split root module github.com/go-openapi/swag, where the code lived in yaml.go until v0.24.0.
Affected Packages
https://github.com/go-openapi/swag.git (GITHUB):
Affected version(s) >=jsonutils/v0.24.0 <jsonutils/v0.27.1Fix Suggestion:
Update to version jsonutils/v0.27.1github.com/go-openapi/swag/jsonutils (GO):
Affected version(s) >=v0.24.0 <v0.27.1Fix Suggestion:
Update to version v0.27.1Related Resources (2)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Uncontrolled Recursion