aws-lambda@0.0.12 vulnerabilities

Deploy AWS Lambda functions from command line using a json or yaml config file.

Direct Vulnerabilities

Known vulnerabilities in the aws-lambda package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Command Injection

aws-lambda is a command line tool deploy code to AWS Lambda.

Affected versions of this package are vulnerable to Command Injection. The config.FunctioName is used to construct the argument used within the exec function without any sanitization. It is possible for a user to inject arbitrary commands to the zipCmd used within config.FunctionName located in the file lib/main.js (line 78).

PoC by JHU System Security Lab

// aws-lambda-config.lambda
{"FunctionName": "& touch Song &", 
"PATH": "./"}
var root = require("aws-lambda");
root.deploy("aws-lambda-config");

How to fix Command Injection?

Upgrade aws-lambda to version 1.0.5 or higher.

<1.0.5