# CVE-2020-36381: aaptjs arbitrary code execution via filePath parameter

Source: https://junglewise.ai/threats/cve-2020-36381-aaptjs-arbitrary-code-execution-via-filepath-parameter  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-11-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2020-36381 · Severity: low · CVSS 3.1 · Published 2021-11-01

aaptjs is a Node.js wrapper for the Android Asset Packaging Tool (aapt). A vulnerability in the singleCrunch function allows attackers to execute arbitrary code by crafting malicious filePath parameters. An application using this library to process untrusted Android package files could be compromised, allowing attackers to take full control of the system running the vulnerable code.

Technologies: [aaptjs (npm)](https://junglewise.ai/threats/technologies/aaptjs). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2020-36381 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-36381 being exploited in the wild.

**How severe is CVE-2020-36381?** Low severity, with a CVSS score of 3.1, published 1 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-36381?** 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-36381 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2020-36381?** 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-78) in the singleCrunch function where user-supplied filePath parameters are not properly sanitized before being passed to an exec() call. The vulnerable code directly concatenates user input into shell commands without escaping or validation. An unauthenticated attacker can exploit this by providing specially crafted filePath values that include shell metacharacters, allowing arbitrary command execution with the privileges of the Node.js process. The vulnerability affects aaptjs version 1.3.1 and all prior versions. As of the advisory publication (November 2021), no patch was explicitly indicated, requiring users to avoid this library or upgrade if a fixed version becomes available.

## Affected products

- shenzhim aaptjs 1.3.1 and earlier

## Identifiers

- CVE-2020-36381
- GHSA-7fw7-gh23-f832

## Timeline

- 2021-11-01: disclosed: GHSA advisory published
- 2020-10-02: other: Issue reported on GitHub

## References

- [https://github.com/shenzhim/aaptjs/issues/2](https://github.com/shenzhim/aaptjs/issues/2)

## Related threats

- [aaptjs packageCmd arbitrary code execution via filePath](https://junglewise.ai/threats/cve-2020-36378-aaptjs-packagecmd-arbitrary-code-execution-via-filepath)
- [aaptjs arbitrary code execution in remove function](https://junglewise.ai/threats/cve-2020-36379-aaptjs-arbitrary-code-execution-in-remove-function)
- [aaptjs arbitrary code execution in dump function](https://junglewise.ai/threats/cve-2020-36377-aaptjs-arbitrary-code-execution-in-dump-function)
- [aaptjs command injection in list function](https://junglewise.ai/threats/cve-2020-36376-aaptjs-command-injection-in-list-function)
- [aaptjs crunch function arbitrary code execution via filePath](https://junglewise.ai/threats/cve-2020-36380-aaptjs-crunch-function-arbitrary-code-execution-via-filepath)
