Description Preview
The @ronomon/opened library versions before 1.5.2 contain a command injection vulnerability (CWE-78). This vulnerability allows remote attackers to execute arbitrary commands on the host system when the library processes untrusted input. The vulnerability occurs because the library does not properly sanitize or validate user-supplied input before using it in system commands.
Overview
The @ronomon/opened library is used to determine if a file is currently opened by another process. The vulnerability exists in versions prior to 1.5.2, where the library fails to properly sanitize input parameters before passing them to system commands. An attacker who can control the input passed to the library can inject malicious commands that will be executed with the privileges of the application using the library. This is particularly dangerous in web applications or services that process user-supplied filenames or paths and use this library to check if files are in use.
Remediation
To remediate this vulnerability, users should:
- Update the @ronomon/opened library to version 1.5.2 or later.
- If updating is not immediately possible, implement input validation and sanitization before passing any user-controlled data to the library.
- Consider using the principle of least privilege for applications that use this library, limiting the potential impact of command execution.
- Review application code to ensure that untrusted input is never passed directly to the library without proper validation.
References
- Checkmarx Security Advisory: https://advisory.checkmarx.net/advisory/CX-2021-4775
- Patch commit: https://github.com/ronomon/opened/commit/7effe011d4fea8fac7f78c00615e0a6e69af68ec
- CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'): https://cwe.mitre.org/data/definitions/78.html
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- Accommodation & Food ServicesAccommodation & Food Services
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting
- Arts, Entertainment & RecreationArts, Entertainment & Recreation
- ConstructionConstruction
- Educational ServicesEducational Services
- Finance and InsuranceFinance and Insurance
- Health Care & Social AssistanceHealth Care & Social Assistance
- InformationInformation
- Management of Companies & EnterprisesManagement of Companies & Enterprises
- ManufacturingManufacturing
- MiningMining
- Other Services (except Public Administration)Other Services (except Public Administration)
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services
- Public AdministrationPublic Administration
- Real Estate Rental & LeasingReal Estate Rental & Leasing
- Retail TradeRetail Trade
- Transportation & WarehousingTransportation & Warehousing
- UtilitiesUtilities
- Wholesale TradeWholesale Trade