Submit #770001: Jawher Kl node-api-postgres 2.5 SQL Injectioninfo

TitleJawher Kl node-api-postgres 2.5 SQL Injection
DescriptionA Critical SQL Injection vulnerability exists in the node-api-postgres application. In the file models/user.js (within User.getAll()), the sort parameter provided via the GET /users endpoint is concatenated directly into the SQL query without adequate sanitization or parameterized execution. Because ORDER BY clauses cannot be parameterized in PostgreSQL, this direct string concatenation allows unauthenticated attackers (after obtaining a basic user JWT) to execute arbitrary SQL commands. This can be exploited to achieve boolean-based data extraction or full data exfiltration via subqueries (e.g., extracting admin bcrypt password hashes and emails).
Source⚠️ https://hackmd.io/@YzU_KiOzT86cEbFQdBceVg/Bk56LQQYbe
User
 yeee3642 (UID 91336)
Submission03/02/2026 16:14 (2 months ago)
Moderation03/14/2026 23:40 (12 days later)
StatusAccepted
VulDB entry351097 [JawherKl node-api-postgres up to 2.5 models/user.js User.getAll sort sql injection]
Points20

Want to stay up to date on a daily basis?

Enable the mail alert feature now!