GHSA-4QQC-MP5F-CCV4
Vulnerability from github – Published: 2020-09-02 15:05 – Updated: 2020-09-02 15:04Versions of bestzip prior to 2.1.7 are vulnerable to Command Injection. The package fails to sanitize input rules and passes it directly to an exec call on the zip function . This may allow attackers to execute arbitrary code in the system as long as the values of destination is user-controlled. This only affects users with a native zip command available. The following examples demonstrate the issue from the CLI and also programatically:
- bestzip test.zip 'sourcefile; mkdir folder'
- zip({ source: 'sourcefile', destination: './test.zip; mkdir folder' })
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "bestzip"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2020-09-02T15:04:08Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Versions of `bestzip` prior to 2.1.7 are vulnerable to Command Injection. The package fails to sanitize input rules and passes it directly to an `exec` call on the `zip` function . This may allow attackers to execute arbitrary code in the system as long as the values of `destination` is user-controlled. This only affects users with a native `zip` command available. The following examples demonstrate the issue from the CLI and also programatically:\n- `bestzip test.zip \u0027sourcefile; mkdir folder\u0027`\n- `zip({ source: \u0027sourcefile\u0027, destination: \u0027./test.zip; mkdir folder\u0027 })`",
"id": "GHSA-4qqc-mp5f-ccv4",
"modified": "2020-09-02T15:04:08Z",
"published": "2020-09-02T15:05:51Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1554"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Command Injection in bestzip"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.