{"answers":{"affected":"4 open source packages ship an affected version, including Scriban.Signed and scriban.","exploited":"There is no known exploitation of GHSA-5rpf-x9jg-8j5p in the wild and no public exploit code.","fix":"Upgrade Scriban.Signed to 6.6.0 or later.","what":"GHSA-5rpf-x9jg-8j5p is a denial of service vulnerability in Scriban.Signed, published on 19 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-5rpf-x9jg-8j5p and fix it if it is affected.\n\nWhat it is: GHSA-5rpf-x9jg-8j5p is a denial of service vulnerability in Scriban.Signed, published on 19 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-5rpf-x9jg-8j5p in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- Scriban.Signed (NuGet): affected all versions; fixed in 6.6.0\n- Scriban.Signed (NuGet): affected all versions; fixed in 6.6.0\n- scriban (NuGet): affected all versions; fixed in 6.6.0\n- scriban (NuGet): affected all versions; fixed in 6.6.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-5rpf-x9jg-8j5p/ (Markdown: https://insights.sbomify.com/GHSA-5rpf-x9jg-8j5p/index.md)","id":"GHSA-5rpf-x9jg-8j5p","markdown":"https://insights.sbomify.com/GHSA-5rpf-x9jg-8j5p/index.md","name":"GHSA-5rpf-x9jg-8j5p","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Scriban template library","requires_auth":"none","summary":"Attackers can cause denial of service in applications using Scriban by supplying templates that trigger exponential memory allocation.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"`TemplateContext.LimitToString` defaults to `0` (unlimited). While Scriban implements a default `LoopLimit` of 1000, an attacker can still cause massive memory allocation via exponential string growth. Doubling a string for just 30 iterations generates over 1GB of text, instantly exhausting heap memory and crashing the host process. Because no output size limit is enforced, repeated string concatenation results in exponential memory growth.\n\n**Proof of Concept (PoC):**\nThe following payload executes in under 30 iterations but results in ~1GB string allocation, crashing the process.\n\n```csharp\nusing Scriban;\n\nstring maliciousTemplate =\n    @\"\n        {{\n            a = \"\"A\"\"\n            for i in 1..30\n                a = a + a\n            end\n            a\n        }}\";\n\nvar template = Template.Parse(maliciousTemplate);\n\nvar context = new TemplateContext();\n\ntry\n{\n    template.Render(context);\n}\ncatch (Exception ex)\n{\n    Console.WriteLine(\"\\nException: \" + ex.Message);\n}\n```\n\n**Impact:**\nAn attacker can supply a small template that triggers exponential string growth, forcing the application to allocate excessive memory. This leads to severe memory pressure, garbage collection thrashing, and eventual process termination (DoS).\n\n**Suggested Fix:**\nEnforce a sensible default limit for string output. Set default `LimitToString` to 1MB (1,048,576 characters). \n\n```csharp\npublic int LimitToString { get; set; } = 1048576; \n```","ecosystems":["NuGet"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Scriban Affected by Memory Exhaustion (OOM) via Unbounded String Generation (Denial of Service)","id":"GHSA-5rpf-x9jg-8j5p","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"NuGet","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"NuGet","fixed":["6.6.0"],"introduced":["0"],"last_affected":[],"package":"Scriban.Signed","purl":null,"source":"GHSA-5rpf-x9jg-8j5p"},{"ecosystem":"NuGet","fixed":["6.6.0"],"introduced":["0"],"last_affected":[],"package":"Scriban.Signed","purl":"pkg:nuget/Scriban.Signed","source":"GHSA-5rpf-x9jg-8j5p"},{"ecosystem":"NuGet","fixed":["6.6.0"],"introduced":["0"],"last_affected":[],"package":"scriban","purl":null,"source":"GHSA-5rpf-x9jg-8j5p"},{"ecosystem":"NuGet","fixed":["6.6.0"],"introduced":["0"],"last_affected":[],"package":"scriban","purl":"pkg:nuget/scriban","source":"GHSA-5rpf-x9jg-8j5p"}],"products":null,"published":"2026-03-19","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can cause denial of service in applications using Scriban by supplying templates that trigger exponential memory allocation.","url":"https://insights.sbomify.com/GHSA-5rpf-x9jg-8j5p/"}