im-metadata@1.0.1

Retrieve image metadata using ImageMagick's identify command

  • latest version

    3.0.1

  • first published

    10 years ago

  • latest version published

    9 years ago

  • licenses detected

  • Direct Vulnerabilities

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

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Command Injection

    im-metadata is a package to retrieve image metadata as a JSON object using ImageMagick's identify command.

    Affected versions of this package are vulnerable to Command Injection. It is possible to inject arbitrary commands as part of the metadata options which is given to the exec function.

    PoC by Snyk Security Team

    var metadata = require('im-metadata');
    
    metadata('/home/snoopy/Pictures/Screenshots/foo.jpg;ls', {exif: true}, function(error, metadata) {
        if (error) { console.error(error); }
        console.log(metadata);
        console.log(metadata.exif);
      });
    

    How to fix Command Injection?

    A fix was pushed into the master branch but not yet published.

    *