Code Injection in json-logic-js package for NPM



Published: 2020-09-14 | Updated: 2020-09-16
Risk High
Patch available NO
Number of vulnerabilities 1
CVE-ID N/A
CWE-ID CWE-94
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software
Subscribe
json-logic-js
Web applications / Modules and components for CMS

Vendor Nicehop

Security Bulletin

This security bulletin contains one high risk vulnerability.

1) Prototype pollution

EUVDB-ID: #VU46701

Risk: Medium

CVSSv3.1: 9 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:U/RC:C]

CVE-ID: N/A

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

Exploit availability: No

Description

The disclosed vulnerability allows a remote attacker to perform code inection attacks.

The vulnerability exists due to insufficient sanitization of user-supplied data. A remote attacker can inject and execute arbitrary script code.

Example:

{
  "method": [
    {
      "method": [
        {
          "var": "__proto__.constructor.is."
        },
        "constructor",
        [
          "var x = 'SECURITY!'; console.log(x, window.fetch); alert(x)"
        ]
      ]
    },
    "call"
  ]
}

Mitigation

Cybersecurity Help is currently unaware of any official solution to address this vulnerability.

Vulnerable software versions

json-logic-js: 1.0.1 - 1.2.2

External links

http://www.npmjs.com/advisories/1542


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###