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
| #!/usr/bin/env python3 | |
| """ | |
| GeoServer jsonArrayContains SQLi -> PostgreSQL RCE / SQL / exfiltration PoC | |
| GeoTools FilterToSqlHelper.constructEquality writes the `expected` argument of | |
| jsonArrayContains RAW into the SQL string (only the JSON pointer is escaped): | |
| jsonb_path_exists("data"::jsonb, '$ ? (@.a == "<VALUE>")') | |
| A single quote in VALUE breaks out of the string literal, closes the call |