Skip to content

Comments

Fix IDOR check bypassed when placeholder can't be resolved#937

Merged
hansott merged 5 commits intomainfrom
idor-bug-sqlite
Feb 17, 2026
Merged

Fix IDOR check bypassed when placeholder can't be resolved#937
hansott merged 5 commits intomainfrom
idor-bug-sqlite

Conversation

@hansott
Copy link
Member

@hansott hansott commented Feb 17, 2026

When resolvePlaceholder returned undefined (e.g. better-sqlite3 params passed as individual args instead of an array), the tenant value comparison was silently skipped. Now unresolvable placeholders produce an explicit error. Also fixes BetterSQLite3 param extraction to handle both .all([v1, v2]) and .all(v1, v2).

Summary by Aikido

Security Issues: 0 🔍 Quality Issues: 2 Resolved Issues: 0

⚡ Enhancements

  • Added named and positional placeholder resolution in BetterSQLite3 resolver
  • Improved Postgres placeholder parsing to match exact $n tokens
  • Added is_placeholder flag to IDOR analysis types and checks
  • Added Object.hasOwn typings to prevent prototype pollution issues

🐛 Bugfixes

  • Fixed IDOR check bypass when placeholders couldn't be resolved
  • Fixed BetterSQLite3 parameter extraction for array and individual arguments

More info

When resolvePlaceholder returned undefined (e.g. better-sqlite3 params
passed as individual args instead of an array), the tenant value
comparison was silently skipped. Now unresolvable placeholders produce
an explicit error. Also fixes BetterSQLite3 param extraction to handle
both .all([v1, v2]) and .all(v1, v2).
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hansott hansott merged commit 72b8625 into main Feb 17, 2026
55 of 56 checks passed
@hansott hansott deleted the idor-bug-sqlite branch February 17, 2026 19:54
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.

2 participants