{"dataType": "CVE_RECORD", "containers": {"adp": [{"metrics": [{"other": {"type": "Unknown", "content": {"data": "{\"description\":\"MODERATE\"}"}}}], "affected": [{"vendor": "npm", "product": "nunjucks", "versions": [{"status": "affected", "version": "0", "lessThan": "2.4.3", "versionType": "semver"}], "defaultStatus": "unaffected"}], "references": [{"url": "https://github.com/advisories/GHSA-f7ph-p5rv-phw2"}, {"url": "https://github.com/matt-/nunjucks_test"}, {"url": "https://github.com/mozilla/nunjucks/issues/835"}, {"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10547"}, {"url": "https://www.npmjs.com/advisories/147"}], "descriptions": [{"lang": "en", "value": "Affected versions of `nunjucks` do not properly escape specially structured user input in template vars when in auto-escape mode, resulting in a cross-site scripting vulnerability.\n\n## Proof of Concept\n\nBy using an array for the keys in a template var, escaping is bypassed.\n```javascript\nname[]=<script>alert(1)</script>\n```\n\nA full PoC is available in the references section.\n\n\n## Recommendation\n\nUpdate to version 2.4.3 or later."}, {"lang": "en", "value": "Cross-Site Scripting in nunjucks"}], "providerMetadata": {"orgId": "386269d4-a6c6-4eaa-bf8e-bc0b0d010558", "shortName": "npm", "dateUpdated": "2018-11-06T23:13:37Z", "x_subShortName": "npm"}}], "cna": {"metrics": [{"format": "CVSS", "cvssV2_0": {"version": "2.0", "baseScore": 4.3, "accessVector": "NETWORK", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "authentication": "NONE", "integrityImpact": "PARTIAL", "accessComplexity": "MEDIUM", "availabilityImpact": "NONE", "confidentialityImpact": "NONE"}}, {"format": "CVSS", "cvssV3_0": {"scope": "CHANGED", "version": "3.0", "baseScore": 6.1, "attackVector": "NETWORK", "baseSeverity": "MEDIUM", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "integrityImpact": "LOW", "userInteraction": "REQUIRED", "attackComplexity": "LOW", "availabilityImpact": "NONE", "privilegesRequired": "NONE", "confidentialityImpact": "LOW"}}], "affected": [{"cpes": ["cpe:2.3:a:mozilla:nunjucks:*:*:*:*:*:*:*:*"], "vendor": "mozilla", "product": "nunjucks", "versions": [{"status": "affected", "version": "0", "versionType": "custom", "lessThanOrEqual": "2.4.2"}], "defaultStatus": "unaffected"}], "references": [{"url": "https://github.com/matt-/nunjucks_test", "tags": ["exploit", "third-party-advisory"]}, {"url": "https://github.com/mozilla/nunjucks/issues/835", "tags": ["exploit", "third-party-advisory"]}, {"url": "https://nodesecurity.io/advisories/147", "tags": ["exploit", "third-party-advisory"]}], "descriptions": [{"lang": "en", "value": "Nunjucks is a full featured templating engine for JavaScript. Versions 2.4.2 and lower have a cross site scripting (XSS) vulnerability in autoescape mode. In autoescape mode, all template vars should automatically be escaped. By using an array for the keys, such as `name[]=<script>alert(1)</script>`, it is possible to bypass autoescaping and inject content into the DOM."}, {"lang": "es", "value": "Nunjucks es un motor de creación de plantillas con funcionalidades completas para JavaScript. Las versiones 2.4.2 y anteriores tienen una vulnerabilidad de Cross-Site Scripting (XSS) en el modo autoescape. En este modo, todas las variables de plantilla deberían escaparse automáticamente. Mediante el uso de un array para las claves, como \"name[]=\", es posible omitir el autoescapado e inyectar contenido en el DOM."}], "problemTypes": [{"descriptions": [{"lang": "en", "cweId": "CWE-79", "description": "CWE-79"}]}], "providerMetadata": {"orgId": "00000000-0000-4000-A000-000000000003", "shortName": "nvd", "dateUpdated": "2018-05-31T20:29:01Z", "x_subShortName": "nvd"}}}, "cveMetadata": {"cveId": "CVE-2016-10547", "state": "PUBLISHED", "dateUpdated": "2024-11-21T02:44:14Z", "assignerOrgId": "36234546-b8fa-4601-9d6f-f4e334aa8ea1", "datePublished": "2018-05-31T20:29:01Z", "assignerShortName": "hackerone"}, "dataVersion": "5.0"}