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-26105HIGHAll versions of the package utilities are vulnerable to Prototype Pollution via the _mix function. EPSS 1.3%CVE-2021-43787CRITICALXSS via prototype pollutionEPSS 1.3%CVE-2025-25015CRITICALKibana arbitrary code execution via prototype pollutionEPSS 1.3%CVE-2021-3666HIGHPrototype Pollution in fiznool/body-parser-xmlEPSS 1.3%CVE-2022-37614CRITICALPrototype pollution vulnerability in function enable in mockery.js in mfncooper mockery commit 822f0566fd6d72af8c943ae5ca2aa92e516aa2cf via EPSS 1.3%CVE-2022-1295HIGHPrototype Pollution in alvarotrigo/fullpage.jsEPSS 1.3%CVE-2021-4307MEDIUMYomguithereal Baobab prototype pollutionEPSS 1.3%CVE-2023-26133HIGHAll versions of the package progressbar.js are vulnerable to Prototype Pollution via the function extend() in the file utils.js. EPSS 1.3%CVE-2020-36604HIGHhoek before 8.5.1 and 9.x before 9.0.3 allows prototype poisoning in the clone function.EPSS 1.2%CVE-2021-39205MEDIUMDOM-based XSS/Content Spoofing via Prototype PollutionEPSS 1.2%CVE-2023-26113HIGHVersions of the package collection.js before 6.8.1 are vulnerable to Prototype Pollution via the extend function in Collection.js/dist/node/EPSS 1.2%CVE-2022-37623CRITICALPrototype pollution vulnerability in function resolveShims in resolve-shims.js in thlorenz browserify-shim 3.8.15 via the shimPath variable EPSS 1.2%CVE-2023-3696CRITICALPrototype Pollution in automattic/mongooseEPSS 1.2%CVE-2023-28427HIGHPrototype pollution in matrix-js-sdkEPSS 1.2%CVE-2023-45827HIGHPrototype Pollution vulnerability in @clickbar/dot-diverEPSS 1.2%CVE-2024-38996CRITICALag-grid-community v31.3.2 and ag-grid-enterprise v31.3.2 were discovered to contain a prototype pollution via the _.mergeDeep function. ThisEPSS 1.2%CVE-2024-30564CRITICALAn issue inandrei-tatar nora-firebase-common between v.1.0.41 and v.1.12.2 allows a remote attacker to execute arbitrary code via a crafted EPSS 1.2%CVE-2024-48910CRITICALDOMPurify vulnerable to tampering by prototype polutionEPSS 1.2%CVE-2022-37621CRITICALPrototype pollution vulnerability in function resolveShims in resolve-shims.js in thlorenz browserify-shim 3.8.15 via the fullPath variable EPSS 1.1%CVE-2022-37611CRITICALPrototype pollution vulnerability in tschaub gh-pages 3.1.0 via the partial variable in util.js.EPSS 1.1%