CVE-2020-36379: Vulnerability in aaptjs allows arbitrary code execution

aaptjs Updated 02 Oct 2025

Summary

02/11/2021
No i
Critical
9.8

CVE-2020-36379: Vulnerability in remove function leads to arbitrary code execution via filePath parameters. Affects aaptjs versions < 1.3.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

aaptjs is a node wrapper for aapt, a command-line tool used for Android app packaging. It provides a convenient interface for interacting with aapt functionality in Node.js applications. The vulnerability affects version 1.3.1 of shenzhim aaptjs. This vulnerability allows attackers to execute arbitrary code by exploiting the remove function in the library. The remove function is responsible for removing files, and the vulnerability arises from improper handling of the filePath parameter.

Vulnerability Detail

The vulnerability in aaptjs version 1.3.1 allows attackers to execute arbitrary code by manipulating the filePath parameter in the remove function. This can lead to unauthorized access, data breaches, and potential compromise of the entire system. The issue arises due to a lack of proper input validation and sanitization, allowing attackers to inject malicious code into the filePath parameter. Successful exploitation of this vulnerability can result in the execution of arbitrary commands or the modification/deletion of critical files on the system.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, it is advised to avoid using the remove function in aaptjs until the vulnerability is fixed. If the remove functionality is essential, consider implementing additional input validation and sanitization measures to ensure the filePath parameter is not susceptible to code injection attacks. Here is an example of how to sanitize the filePath parameter using the 'path' module in Node.js:

const path = require('path');

function sanitizeFilePath(filePath) {
  return path.normalize(filePath);
}

Conclusion

The vulnerability in aaptjs version 1.3.1 allows arbitrary code execution through the filePath parameter in the remove function. To mitigate this issue, it is crucial to update to a patched version of aaptjs beyond 1.3.1. Additionally, implementing proper input validation and sanitization measures can help prevent code injection attacks. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for aaptjs →

Share this vulnerability

FAQ

aaptjs is a node wrapper for aapt, a command-line tool used for Android app packaging. It provides a convenient interface for interacting with aapt functionality in Node.js applications.

This vulnerability allows attackers to execute arbitrary code, potentially leading to unauthorized access, data breaches, and compromise of the system.

To fix this vulnerability, update to a patched version of aaptjs (beyond 1.3.1) using the package manager for the respective ecosystem (npm in this case).

As a temporary workaround, avoid using the remove function in aaptjs until the vulnerability is fixed. If necessary, implement additional input validation and sanitization measures for the filePath parameter.

For more information about this vulnerability, refer to the CVE identifier (CVE-2020-36379) and the associated advisory on the GitHub Advisory Database.

Related vulnerabilities

Recent vulnerabilities recorded for aaptjs.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback