Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions benchmark/data/tasks/ecvebench-scratch-svg-renderer-001.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"task_id": "ecvebench-scratch-svg-renderer-001",
"ghsa_id": "GHSA-j977-g5vj-j27g",
"codebase": {
"repo": "https://github.com/scratchfoundation/scratch-svg-renderer",
"language": "javascript",
"ecosystem": "npm",
"commit": "5e415baeda9e94c3747721e2a0860b2234f617f4"
},
"hints": {
"L0": null,
"L1": {
"area": "SVG content processing and rendering pipeline"
},
"L2": {
"description": "A cross-site scripting vulnerability exists where user-provided SVG content is loaded and inserted into the document DOM without proper sanitization, allowing arbitrary elements to be injected."
},
"L3": {
"area": "SVG string loading and DOM measurement logic",
"description": "A cross-site scripting vulnerability exists where user-provided SVG content is parsed and appended to the document body for bounding box measurement without sanitization, allowing arbitrary elements to be injected into the DOM."
}
},
"ground_truth": {
"vulnerable": true,
"vuln_class": "xss",
"cvss": 9.7,
"reason": "The SVG string loading function does not sanitize input, and the DOM measurement routine appends the unsanitized SVG to the document body, enabling injection of arbitrary elements including scripts.",
"locations": [
{
"file": "src/svg-renderer.js",
"function": "_transformMeasurements"
},
{
"file": "src/svg-renderer.js",
"function": "loadString"
}
]
}
}
8 changes: 8 additions & 0 deletions benchmark/internal/metadata/GHSA-j977-g5vj-j27g.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ghsa_id": "GHSA-j977-g5vj-j27g",
"post_patch_commit": "9ebf57588aa596c4fa3bb64209e10ade395aee90",
"noisy_patch": false,
"curation_notes": "Primary location derived from the patch diff: the fix adds DOMPurify sanitization in _transformMeasurements before inserting SVG into the DOM. loadString is the entry point that parses untrusted SVG strings without sanitization. Only 1 non-test source file (src/svg-renderer.js) was changed. No sibling files in src/ perform DOM insertion of SVG content. Vulnerability class xss confirmed — matches CWE-79 and the advisory description of arbitrary element injection via unsanitized SVG.",
"dataset_version": "0.1.0",
"snapshot_date": "2026-04-26"
}