GHSA-6cpc-mj5c-m9rq

Suggest an improvement
Source
https://github.com/advisories/GHSA-6cpc-mj5c-m9rq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/02/GHSA-6cpc-mj5c-m9rq/GHSA-6cpc-mj5c-m9rq.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-6cpc-mj5c-m9rq
Aliases
Published
2019-02-18T23:40:03Z
Modified
2023-11-01T04:46:34Z
Summary
Arbitrary File Write in cli
Details

Affected versions of cli use predictable temporary file names. If an attacker can create a symbolic link at the location of one of these temporarly file names, the attacker can arbitrarily write to any file that the user which owns the cli process has permission to write to.

Proof of Concept

By creating Symbolic Links at the following locations, the target of the link can be written to.

lock_file = '/tmp/' + cli.app + '.pid',
log_file = '/tmp/' + cli.app + '.log';

Recommendation

Update to version 1.0.0 or later.

Database specific
{
    "cwe_ids":  [
        "CWE-22"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-06-16T21:18:53Z",
    "nvd_published_at":  null,
    "severity":  "LOW"
}
References

Affected packages

npm / cli

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/02/GHSA-6cpc-mj5c-m9rq/GHSA-6cpc-mj5c-m9rq.json"