T09 · Insecure Skill Coding Practices
- Location
scripts/audit.js:207- Finding
SQL Injection Through Unvalidated Probe UID
- Content
View full analysis
`. Injected SQL could attempt to reset the role or otherwise abuse privileges available to the session. The surrounding transaction and final rollback are not reliable security boundaries. Injected statements could manipulate transaction state, invoke functions with external effects, read protected information, or execute operations whose consequences are not fully neutralized by rollback. ### Attack Path 1. An attacker controls or influences the `--probe-uid` argument supplied to the audit. 2. The malicious value is interpolated into the `SET LOCAL request.jwt.claims` SQL statement. 3. The value terminates the expected string literal and appends attacker-selected SQL. 4. The injected statements execute through the privileged PostgreSQL connection. 5. Depending on database permissions and installed functionality, the attacker may read or modify project data, alter policies or roles, or compromise database integrity. ### Impact Assessment Successful exploitation can provide unauthorized database access within the privileges of the connection. Potential scope includes: - Reading data protect ...[truncated 272 chars]- Remediation
View remediation
