dfgvaetyj3456356-hash opened a new pull request, #40498: URL: https://github.com/apache/superset/pull/40498
This PR fixes a SQL injection vulnerability in the Google Sheets database engine spec. **CWE:** CWE-89 (SQL Injection) **File:** superset/db_engine_specs/gsheets.py validate_parameters() constructed SQL queries by interpolating user-provided URLs with only simple double-quote escaping. This is insufficient SQL escaping. A malicious URL containing SQL metacharacters could potentially alter the query structure. **Fix:** - Adds _is_valid_gsheets_url() to enforce strict URL format validation - Only allows https://docs.google.com/spreadsheets/d/<id>/... URLs - Raises ValueError for invalid URLs before SQL construction - Adds tests for valid and invalid URL patterns -- 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]
