cschanhniem commented on issue #41869:
URL: https://github.com/apache/superset/issues/41869#issuecomment-4917292948

   The SQL injection surface here is in the Presto `latest_sub_partition` 
implementation, where the partition field from the form data is embedded into a 
SQL string. The current guard blocks some patterns but a regex-based allowlist 
is inherently fragile — Presto partition names can contain arbitrary 
identifiers including dotted paths and reserved words.
   
   A more robust fix would be to parameterize the partition field through the 
SQLAlchemy text() construct with bind parameters, or to validate the field 
against the actual list of known partitions (retrieved via SHOW PARTITIONS) 
before constructing the query, rather than trying to sanitize the input string.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to