CVE-2020-36377: aaptjs arbitrary code execution in dump function

CVE-2020-36377 · Severity: low · CVSS 3.1 · Published 2021-11-02

aaptjs is a Node.js wrapper for the Android Asset Packaging Tool (aapt). The dump function fails to properly sanitize file path parameters, allowing attackers to inject and execute arbitrary shell commands. An attacker can exploit this to gain full system access, steal sensitive data, or disrupt service availability.

Technologies: aaptjs (npm). Vendors: npm.

Quick answers

Is CVE-2020-36377 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2020-36377 being exploited in the wild.
How severe is CVE-2020-36377?
Low severity, with a CVSS score of 3.1, published 2 November 2021.
Which products and versions are affected?
aaptjs (npm) SEMVER:introduced=0,last_affected=1.3.1.
Is there a fix for CVE-2020-36377?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2020-36377 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2020-36377?
Check whether you run aaptjs (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a command injection flaw (CWE-77, CWE-78) in the dump function of aaptjs that passes unsanitized user input directly to shell execution via the exec() call. The filePath parameter is not validated or escaped before being used in command construction, allowing an attacker to break out of the intended command and execute arbitrary shell code. The attack requires network access to an application using aaptjs, with no authentication or user interaction needed. An attacker can achieve remote code execution with the privileges of the Node.js process. The vulnerability affects aaptjs versions 1.3.1 and earlier; patch status is unclear from available sources.

Affected products

  • shenzhim aaptjs 1.3.1 and earlier

Identifiers

  • CVE-2020-36377
  • GHSA-r496-7hgp-53wf

Timeline

  • 2020-10-02: disclosed: Issue raised on GitHub
  • 2021-11-02: advisory: GHSA advisory published
  • 2021-10-31: other: CVE-2020-36377 published on NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.