CVE-2020-4066: Command Injection in Limdu
Summary
CVE-2020-4066: Command Injection in Limdu. Affects limdu versions < 0.9.5. Fixed in 0.9.5. 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
Limdu is an open-source library in the npm ecosystem that provides a machine learning framework for Node.js. It allows developers to build and train classifiers for various natural language processing tasks. However, versions of Limdu up to 0.9.4 are vulnerable to a command injection attack in the trainBatch function. This vulnerability can be exploited by an attacker to execute arbitrary commands on the host system. The impact of this vulnerability can be severe, as it allows unauthorized remote code execution.
Vulnerability Detail
The trainBatch function in Limdu suffers from a command injection vulnerability. This means that an attacker can manipulate the input to the function in such a way that it includes malicious commands. When the vulnerable code executes these commands, it can lead to unauthorized actions on the host system. This vulnerability can be particularly dangerous if the classifiers used by Limdu rely on shell execution, such as SVM Perf, SVM Linear, or Adaboost. It is important to note that clients of the Limdu library may not be aware of this vulnerability and could inadvertently introduce it into their code.
How To Fix
Minimum fixed version
0.9.5
This is the first release that contains the fix.
npm install limdu@0.9.5
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating to the latest version of Limdu is not immediately feasible, a workaround is to avoid using the trainBatch function with classifiers that rely on shell execution. This includes classifiers like SVM Perf, SVM Linear, or Adaboost. By refraining from using these specific classifiers, the risk of command injection can be mitigated.
Conclusion
The command injection vulnerability in Limdu can have severe consequences, allowing unauthorized remote code execution. It is crucial for developers using Limdu to update to version 0.9.5 or later to mitigate this vulnerability. If immediate updating is not possible, avoiding the use of certain classifiers can serve as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for limdu →
FAQ
Limdu is an open-source machine learning library for Node.js that provides a framework for building and training classifiers for natural language processing tasks.
The command injection vulnerability in Limdu can allow an attacker to execute arbitrary commands on the host system. This can lead to unauthorized actions and potential compromise of the system.
To fix this vulnerability, it is recommended to update to version 0.9.5 or later of the Limdu library. This version includes a patch that addresses the command injection vulnerability.
If updating to the latest version is not immediately feasible, a workaround is to avoid using the trainBatch function with classifiers that rely on shell execution, such as SVM Perf, SVM Linear, or Adaboost.
There is no known exploitation of this vulnerability at the moment. However, it is important to address the vulnerability promptly to prevent any potential attacks.