Weaknesses of type CWE-1321

380 results

Poluição de Protótipo

É a capacidade de um atacante modificar o protótipo de objetos JavaScript (ou estruturas similares em outras linguagens), afetando todas as instâncias daquela classe. Isso ocorre quando o código não valida ou sanitiza chaves de entrada antes de atribuir propriedades a objetos, permitindo acesso a `__proto__`, `constructor.prototype` ou `prototype`. O risco é grave: dados sensíveis podem ser injetados globalmente, lógica de autenticação contornada, ou até código executado.

Example

Um servidor Node.js recebe um objeto JSON `{"name": "João", "__proto__": {"isAdmin": true}}` e o mescla ingenuamente em um objeto de usuário via `Object.assign(usuario, entrada)`. De repente, todos os novos objetos criados herdam `isAdmin: true`, elevando privilégios sem qualquer validação real.

How to mitigate

Nunca confie em chaves de entrada: valide e bloqueie explicitamente chaves perigosas como `__proto__`, `constructor`, `prototype` antes de atribuir. Use `Object.create(null)` para criar objetos sem protótipo herdado, ou bibliotecas seguras como `lodash.merge` com configurações defensivas. Em APIs REST, considere esquemas estritos (JSON Schema) que rejeitam propriedades inesperadas.

CVE-2023-36475CRITICALParse Server vulnerable to remote code execution via MongoDB BSON parser through prototype pollutionEPSS 3.2%CVE-2024-21512HIGHVersions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields aEPSS 3.1%CVE-2023-26136MEDIUMVersions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookiEPSS 2.5%CVE-2023-26122HIGHAll versions of the package safe-eval are vulnerable to Sandbox Bypass due to improper input sanitization. The vulnerability is derived fromEPSS 2.1%CVE-2021-3805HIGHPrototype Pollution in mariocasciaro/object-pathEPSS 2.1%CVE-2021-21304HIGHPrototype Pollution in DynamooseEPSS 1.9%CVE-2025-13465MEDIUMPrototype Pollution Vulnerability in Lodash _.unset and _.omit functionsEPSS 1.8%CVE-2022-37602CRITICALPrototype pollution vulnerability in karma-runner grunt-karma 4.0.1 via the key variable in grunt-karma.js.EPSS 1.8%CVE-2024-56059CRITICALWordPress Partners plugin <= 0.2.0 - PHP Object Injection vulnerabilityEPSS 1.7%CVE-2021-3757HIGHPrototype Pollution in immerjs/immerEPSS 1.7%CVE-2022-37265CRITICALPrototype pollution vulnerability in stealjs steal 2.2.4 via the alias variable in babel.js.EPSS 1.6%CVE-2023-39296HIGHQTS, QuTS heroEPSS 1.6%CVE-2022-29823CRITICALFeathers - Query “__proto__” is converted to real prototypeEPSS 1.5%CVE-2021-3766HIGHPrototype Pollution in vincit/objection.jsEPSS 1.5%CVE-2021-3645MEDIUMPrototype Pollution in viking04/mergeEPSS 1.4%CVE-2024-27307CRITICALJSONata expression can pollute the "Object" prototypeEPSS 1.4%CVE-2023-0842MEDIUMxml2js 0.4.23 - Prototype PollutionEPSS 1.4%CVE-2024-29650CRITICALAn issue in @thi.ng/paths v.5.1.62 and before allows a remote attacker to execute arbitrary code via the mutIn and mutInManyUnsafe componentEPSS 1.4%CVE-2021-21297HIGHPrototype Pollution in Node-RedEPSS 1.4%CVE-2021-39227MEDIUMFix prototype pollution in the zrender merge and clone helper methodsEPSS 1.4%