{"items":[{"id":"NVI-00017533","kind":"vulnerability","title":"Scriban: Denial of Service via Unbounded Cumulative Template Output Bypassing LimitToString","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-m2p3-hwv5-xpqw"],"plain_summary":"GitHub lists this reviewed advisory for Scriban, Scriban.Signed. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-15cb74663138d857e1a2e6f5b0feef83"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-07-06T13:09:52.000Z","value":"6.5 medium","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-15cb74663138d857e1a2e6f5b0feef83"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-15cb74663138d857e1a2e6f5b0feef83","url":"https://github.com/advisories/GHSA-m2p3-hwv5-xpqw","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-m2p3-hwv5-xpqw","publisher":"GitHub Advisory Database","observed_at":"2026-11-05T03:47:11.081Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-15cb74663138d857e1a2e6f5b0feef83"],"technology":"Scriban","known_exclusions":[],"conditions_summary":"## Summary\n\nThe `LimitToString` safety limit (default 1MB since commit `b5ac4bf`) can be bypassed to allocate approximately 1GB of memory by exploiting the per-call reset of `_currentToStringLength` in `ObjectToString`. Each template expression rendered through `TemplateContext.Write(SourceSpan, object)` triggers a separate top-level `ObjectToString` call that resets the length counter to zero, and the underlying `StringBuilderOutput` has no cumulative output size limit. An attacker who can supply a template can cause an out-of-memory condition in the host application.\n\n## Details\n\nThe root cause is in `TemplateContext.Helpers.cs`, in the `ObjectToString` method:\n\n```csharp\n// src/Scriban/TemplateContext.Helpers.cs:89-111\npublic virtual string ObjectToString(object value, bool nested = false)\n{\n    if (_objectToStringLevel == 0)\n    {\n        _currentToStringLength = 0;  //  0 && _objectToStringLevel == 1 && result != null && result.Length >= LimitToString)\n        {\n            return result + \"...\"","public_affected_ranges":["< 7.0.0"]},{"certainty":"source_listed","source_ids":["sr-15cb74663138d857e1a2e6f5b0feef83"],"technology":"Scriban.Signed","known_exclusions":[],"conditions_summary":"## Summary\n\nThe `LimitToString` safety limit (default 1MB since commit `b5ac4bf`) can be bypassed to allocate approximately 1GB of memory by exploiting the per-call reset of `_currentToStringLength` in `ObjectToString`. Each template expression rendered through `TemplateContext.Write(SourceSpan, object)` triggers a separate top-level `ObjectToString` call that resets the length counter to zero, and the underlying `StringBuilderOutput` has no cumulative output size limit. An attacker who can supply a template can cause an out-of-memory condition in the host application.\n\n## Details\n\nThe root cause is in `TemplateContext.Helpers.cs`, in the `ObjectToString` method:\n\n```csharp\n// src/Scriban/TemplateContext.Helpers.cs:89-111\npublic virtual string ObjectToString(object value, bool nested = false)\n{\n    if (_objectToStringLevel == 0)\n    {\n        _currentToStringLength = 0;  //  0 && _objectToStringLevel == 1 && result != null && result.Length >= LimitToString)\n        {\n            return result + \"...\"","public_affected_ranges":["< 7.0.0"]}],"null_published_at":"2026-11-05T19:10:21.406Z","source_updated_at":"2026-07-06T13:09:52.000Z","source_disclosed_at":"2026-03-24T22:15:43.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-05T03:47:11.081Z"}],"next_cursor":null,"snapshot_revision":"42594"}