{"items":[{"id":"NVI-00003564","kind":"vulnerability","title":"Graby has stored XSS via iframe srcdoc Attribute in htmLawed Sanitization Config","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-3h6j-9x8m-rg3g"],"plain_summary":"OSV carries this publisher advisory for j0k3r/graby. This is an aggregated source copy; consult the original publisher and compare update dates.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"The original advisory lists fixed boundaries 2.5.1 for j0k3r/graby. Confirm the publisher’s latest guidance.","source_ids":["sr-42e5a4c0b870735c73050ea484e8eb92"],"action_type":"vendor_patch","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":[],"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-42e5a4c0b870735c73050ea484e8eb92","url":"https://github.com/advisories/GHSA-3h6j-9x8m-rg3g","basis":"vendor_advisory","notes":"GitHub-origin advisory, CC-BY-4.0; OSV is an aggregate copy, not independent corroboration.","title":"GHSA-3h6j-9x8m-rg3g","publisher":"GitHub Advisory Database via OSV","observed_at":"2026-10-31T21:41:49.656Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-42e5a4c0b870735c73050ea484e8eb92"],"technology":"j0k3r/graby","known_exclusions":[],"conditions_summary":"## Summary\n\nGraby's `cleanupXss()` function configures htmLawed with conflicting settings: `safe=1` (which removes ``) combined with `'elements' => '*+iframe-meta'` (which re-enables ``). htmLawed does not sanitize the `srcdoc` attribute, allowing injection of arbitrary JavaScript that executes when the content is rendered via `|raw` in templates.\n\n## Root Cause\n\n**`src/Graby.php` lines 1038-1048:**\n```php\nhtmLawed($html, [\n    'safe' => 1,                    // removes \n    'elements' => '*+iframe-meta',  // re-adds , overrides safe=1\n    'deny_attribute' => 'style',    // srcdoc is NOT denied\n]);\n```\n\nThe `safe=1` and `+iframe` combination is a conflict: `safe` mode is designed to strip dangerous elements, but the elements override re-enables `` without also blocking the dangerous `srcdoc` attribute.\n\n## Proof of Concept\n\nInput to `cleanupXss()`:\n```html\n\n```\n\nOutput (unchanged — htmLawed passes it through):\n```html\n\n```\n\nWhen rendered via `{{ content|raw }}` in a template, `srcdoc` exec","public_affected_ranges":["ECOSYSTEM: introduced 0; fixed 2.5.1"]}],"null_published_at":"2026-10-31T22:12:48.021Z","source_updated_at":"2026-03-31T23:32:26.906Z","source_disclosed_at":"2026-03-31T23:12:36.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-10-31T21:41:49.656Z"}],"next_cursor":null,"snapshot_revision":"42594"}