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.
The previous patch attempted to block prototype pollution by checking whether user input contains forbidden keys. However, an attacker can provide crafted input exploiting String.prototype, which allows bypassing this security measure and still polluting Object.prototype. Modification of Object.prototype affects all objects in a given JavaScript environment, which may lead to changes in the application's logic. The vulnerability is classified as CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes).
An attacker can modify properties of the global Object.prototype, which may result in unauthorized access to resources, bypass of authentication or authorization mechanisms, and in specific scenarios also arbitrary code execution in the context of the application.
The Locutus library should be updated to version 2.0.39 or newer, in which the vulnerability has been fixed. Details are available in the vendor references on GitHub.
Locutus library in versions from 2.0.12 to 2.0.38 (inclusive).
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XLocutus
APPLocutus2.0.12 – 2.0.39 (excl.)
Related vulnerabilities
Locutus: RCE w funkcji create_function() przez brak sanityzacji danych wejściowych
Prototype Pollution w pakiecie Locutus (php.strings.parse_str)
Locutus brings stdlibs of other programming languages to JavaScript for educational purposes. Prior to version...
Locutus przynosi standardowe biblioteki innych języków programowania do JavaScriptu w celach edukacyjnych. Prz...
Locutus zawiera standardowe biblioteki innych języków programowania dla JavaScript w celach edukacyjnych. Od w...