Skip to content

fix: escape Jinja context parameters to prevent SQLi - #15

Open
sha174n wants to merge 1 commit into
masterfrom
fix/jinja-context-security
Open

sha174n wants to merge 1 commit into
masterfrom
fix/jinja-context-security

Conversation

@sha174n

@sha174n sha174n commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

This PR addresses multiple SQL Injection vulnerabilities in Jinja context helpers:

  • url_param: Fixed a bypass where parameters from request.args were returned raw without escaping (SUPERSETSEC-135).
  • get_filters: Added an escape_result parameter (defaulting to True) to escape string comparators (SUPERSETSEC-134).
  • filter_values: Added an escape_result parameter (defaulting to True) to escape string values.

Changes:

  • Modified url_param to always apply escaping even for request.args when escape_result=True.
  • Modified get_filters and filter_values to optionally escape string values using the dialect-specific literal processor.
  • Added integration tests to verify escaping for all three helpers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant