Skip to content

Fix SQLite filters key SQL injection (CWE-89)#899

Merged
Teingi merged 1 commit intooceanbase:mainfrom
WSL0809:fix/sqlite-jsonpath-parameterize
Apr 9, 2026
Merged

Fix SQLite filters key SQL injection (CWE-89)#899
Teingi merged 1 commit intooceanbase:mainfrom
WSL0809:fix/sqlite-jsonpath-parameterize

Conversation

@WSL0809
Copy link
Copy Markdown
Contributor

@WSL0809 WSL0809 commented Apr 8, 2026

Fixes #898

Summary:

  • Parameterize SQLite JSON paths in filters by using json_extract(payload, ?) instead of interpolating '$.{key}' into SQL.
  • Add regression test that previously bypassed user_id via malicious filter key.

Test:

  • uv run pytest -q tests/integration/test_storage_integration.py -k sqlite_filters_key_sql_injection_regression

Copy link
Copy Markdown
Member

@Teingi Teingi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi Teingi merged commit 720e37b into oceanbase:main Apr 9, 2026
13 checks passed
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.

[Bug]: SQLite filters key SQL injection bypasses user_id filter (CWE-89)

2 participants