Skip to content

Instantly share code, notes, and snippets.

View portbuster1337's full-sized avatar
🎯
Focusing

portbuster1337

🎯
Focusing
View GitHub Profile
@portbuster1337
portbuster1337 / exploit.py
Created August 13, 2026 21:11
GeoServer jsonArrayContains SQLi -> PostgreSQL RCE python PoC
#!/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