{"items":[{"id":"NVI-00015169","kind":"vulnerability","title":"sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-3496-9g83-7v6x","CVE-2026-59894"],"plain_summary":"GitHub lists this reviewed advisory for sqlparse. 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-345d6efc4f55558c595d46a6243584e1"],"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":[],"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-345d6efc4f55558c595d46a6243584e1","url":"https://github.com/advisories/GHSA-3496-9g83-7v6x","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-3496-9g83-7v6x","publisher":"GitHub Advisory Database","observed_at":"2026-11-02T20:15:44.568Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-345d6efc4f55558c595d46a6243584e1"],"technology":"sqlparse","known_exclusions":[],"conditions_summary":"### Summary\n\nThe documented Python and PHP output modes generate source-code snippets from caller-supplied SQL. Their output filters escape quote characters without first escaping existing backslashes. Crafted SQL can therefore neutralize the generated quote escape, terminate the intended language string, and place attacker-controlled code into the generated snippet. If a downstream consumer executes or imports that generated source, the injected code runs in the consumer's environment.\n\n### Details\n\nThe Python output filter places SQL in a single-quoted string and replaces each single quote with an escaped quote. The PHP output filter performs the equivalent operation for a double-quoted string. Neither transformation escapes pre-existing backslashes before escaping quotes. A backslash supplied immediately before a quote causes the generated backslash to be escaped instead of the quote, allowing the quote to close the string.\n\nThe affected modes are exposed through `sqlparse.format(..., output_format='python')`, `sqlparse.format(..., output_format='php')`, and the corresponding `sqlformat -l` options. Formatting produces the injected source but does not itself execute it; code exe","public_affected_ranges":["<= 0.5.5"]}],"null_published_at":"2026-11-03T10:03:26.556Z","source_updated_at":"2026-08-17T17:20:12.000Z","source_disclosed_at":"2026-08-17T17:20:11.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-02T20:15:44.568Z"}],"next_cursor":null,"snapshot_revision":"42594"}