clamscan@1.0.1 vulnerabilities

Use Node JS to scan files on your server with ClamAV's clamscan/clamdscan binary or via TCP to a remote server or local UNIX Domain socket. This is especially useful for scanning uploaded files provided by un-trusted sources.

  • latest version

    2.4.0

  • latest non vulnerable version

  • first published

    11 years ago

  • latest version published

    1 months ago

  • licenses detected

  • Direct Vulnerabilities

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

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • L
    Command Injection

    clamscan is an Use Node JS to scan files on your server with ClamAV's clamscan binary or clamdscan daemon. This is especially useful for scanning uploaded files provided by un-trusted sources.

    Affected versions of this package are vulnerable to Command Injection. It is possible to inject arbitrary commands as part of the _is_clamav_binary function located within Index.js.

    It should be noted that this vulnerability requires a pre-requisite that a folder should be created with the same command that will be chained to execute. This lowers the risk of this issue.

    PoC by Snyk

    var Root = require("clamscan");
    var fs = require("fs");
    var attack_code = "echo vulnerable > create.txt";
    var root = new Root();
    fs.mkdir(attack_code + "&", function(){});
    root.init({"clamscan": {'path': attack_code + "&"}});
    

    How to fix Command Injection?

    Upgrade clamscan to version 1.3.0 or higher.

    <1.3.0