Arbitrary file deletion in NeMo ASR webapp
Date: 2022-02
Affected: pip/nemo_toolkit
Attack vector: path-traversal
Category: vulnerability-disclosure
Severity: Low
CVE: CVE-2022-22821
CWE: CWE-22
CVSS: 2 (CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:N/I:L/A:N)

### Description NVIDIA NeMo contains a vulnerability in ASR WebApp, where Relative Path Traversal (CWE-23) may lead to deletion of any directory through the "../" structure when admin privileges are available. CVSS Score = 2.0 https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:L/AC:L/PR:H/UI:R/S:U/C:N/I:L/A:N ### Impact When the optional tool ASR Webapp (https://github.com/NVIDIA/NeMo/tree/main/tools/asr_webapp) is used prior to commit https://github.com/NVIDIA/NeMo/commit/f7e4ed7e4f7f2fa43765a38c2fafa1b6d1ebd7c0, some interfaces do not verify user input. Malicious attackers can construct malicious requests to delete any directory through the "../" structure. The vulnerability affects only cases where this particular web app is started by a user with superuser permissions. The web application is *not* a part of the regular pip release or the corresponding container, and impacts only users that clone the repository in its entirety and execute the web app (while also possessing superuser permissions). ## Patches This vulnerability has been patched via https://github.com/NVIDIA/NeMo/commit/f7e4ed7e4f7f2fa43765a38c2fafa1b6d1ebd7c0, which is effectively any clone of the repository post r1.5.1 branch. Since the web app is not distributed via pip release or container, users who clone the main branch post this commit will possess the patch. ### Workarounds The changes in commit https://github.com/NVIDIA/NeMo/commit/f7e4ed7e4f7f2fa43765a38c2fafa1b6d1ebd7c0 can be ap


Mitigations:

Architectural layers (MAESTRO):