Arbitrary File Deletion in NeMo ASR WebApp
Summary
GHSA-rpx7-33j2-xx9x: Arbitrary file deletion in NeMo ASR webapp. Affects nemo-toolkit versions < 1.6.0. Fixed in 1.6.0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
NeMo is an open-source toolkit developed by NVIDIA for building and training conversational AI models. It provides a wide range of functionalities for automatic speech recognition (ASR) tasks. The NeMo ASR WebApp is an optional tool that allows users to interact with the ASR models through a web interface. It was discovered that the ASR WebApp in NeMo is vulnerable to arbitrary file deletion through a relative path traversal attack when admin privileges are available.
Vulnerability Detail
The vulnerability in the NeMo ASR WebApp arises from a lack of input validation in certain interfaces. By constructing malicious requests using the "../" structure, an attacker with admin privileges can delete any directory accessible to the web application. This can lead to the loss of important files or the disruption of the system's functionality. It is important to note that this vulnerability only affects users who clone the entire NeMo repository and execute the web app with superuser permissions.
How To Fix
Minimum fixed version
1.6.0
This is the first release that contains the fix.
pip install --upgrade "nemo-toolkit==1.6.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If applying the patch is not feasible, users can manually incorporate the changes from commit f7e4ed7e4f7f2fa43765a38c2fafa1b6d1ebd7c0 into their version of the NeMo ASR WebApp. This involves updating the affected interfaces to properly validate user input and prevent relative path traversal attacks. Here is an example of the code changes:
# Original vulnerable code
if os.path.exists(user_input):
os.remove(user_input)
# Patched code
if os.path.exists(user_input) and not os.path.isabs(user_input):
os.remove(user_input)
Conclusion
The vulnerability in the NeMo ASR WebApp that allowed arbitrary file deletion has been patched in the NeMo repository. Users are advised to update their NeMo installation to the latest version or apply the provided patch to ensure the security of their systems. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for nemo-toolkit →
FAQ
This vulnerability only affects users who clone the entire NeMo repository and execute the ASR WebApp with superuser permissions. Users who use NeMo through the regular pip release or container are not affected.
The impact of this vulnerability can be significant, as it allows an attacker to delete any directory accessible to the NeMo ASR WebApp. This can result in the loss of important files or the disruption of the system's functionality.
To fix this vulnerability, users should apply the patch provided in the NeMo repository. Alternatively, they can manually incorporate the code changes from the patch into their version of the NeMo ASR WebApp.
Yes, the NeMo ASR WebApp can be used without superuser permissions. However, this vulnerability only affects users who execute the web app with superuser permissions.
Yes, users can manually incorporate the code changes from the patch into their version of the NeMo ASR WebApp if applying the patch is not feasible.
References
Related vulnerabilities
Recent vulnerabilities recorded for nemo-toolkit.