You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a recursion depth limit to prevent stack overflow vulnerabilities
when parsing deeply nested Jsonnet expressions. This addresses potential
denial-of-service attacks where malicious inputs with excessive nesting
could crash the parser.
Key changes:
- Introduce MAX_PARSER_DEPTH constant (1000) to limit parser recursion
- Add depth parameter to all parsing functions
- Check depth limit before parsing recursively nested structures
- Throw clear error message when maximum depth is exceeded
- Improve documentation for parsing functions
- Add test case to verify limit enforcement
Signed-off-by: Ville Vesilehto <[email protected]>
0 commit comments