Repository navigation
fix(security): findings of the review of the guard, the detector and the zip extractor - #1797
Merged
Merged
Conversation
This was referenced Oct 25, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From two independent read-only reviews of what was merged in the last session (#1765, #1769, #1770).
Update zip (#1765). Entries were checked by name only. An archive with
a -> .,a/b -> ..and a fileb/evilwrote outside the extraction root. Now any entry whose parent directory chain contains a symlink already on disk is refused.MCP SQL guard (#1769).
ambiguous_syntax: a quoted identifier holding--,',#or/*(read left to right, so ordinary quoting is not affected), a PostgreSQLU&"..."identifier, MySQL#comments and MySQL--without a following space. The comment/string stripper and the server read these differently, which letSELECT 1 AS "--", pg_sleep(100)andSELECT 1--1, SLEEP(30)through.pg_notify,pg_ls_*,pg_stat_*reset*,pg_logical_*(slot get/peek changes),pg_replication_*,pg_create_*_slot,pg_copy_*_slot,pg_backup_*.Destructive detector (#1770).
WITH d AS (DELETE FROM t RETURNING *) SELECT ...) is inspected.WITHthe scan stops at the main statement keyword, so an upsert'sON CONFLICT DO UPDATEand a column calleddeleteare no longer flagged.DELETE FROM orders o USING (SELECT 1 FROM t ...)namesorders, nott(the optional group is lazy now); the modifier group that backtracked quadratically is gone.ALTER TABLE t DROP col(COLUMNis optional),DROP FOREIGN/TEMPORARY TABLE,DROP EVENT TRIGGER,DROP SERVER,DROP OWNED BY.Tests for each. Not run locally, CI will.