Headline
CVE-2023-26143: Snyk Vulnerability Database | Snyk
Versions of the package blamer before 1.0.4 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.
**Arbitrary Argument Injection Affecting blamer package, versions **<1.0.4****
Threat Intelligence
Exploit Maturity Proof of concept
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();
Related news
Versions of the package blamer before 1.0.4 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.