SQL Injection Affecting connect-pg-simple package, versions <6.0.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.08% (35th percentile)

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-CONNECTPGSIMPLE-460154
  • published 27 Aug 2019
  • disclosed 21 Aug 2019
  • credit Robert Nilsson

How to fix?

Upgrade connect-pg-simple to version 6.0.1 or higher.

Overview

connect-pg-simple is a minimal PostgreSQL session store for Express/Connect.

Affected versions of this package are vulnerable to SQL Injection within PGStore.prototype.quotedTable function where user input is wrapped using double quotes. If the schemaName is set to 'web".session WHERE $1=$1;--, it is possible to wipe the web.session table every time the prune process runs.

CVSS Scores

version 3.1
Expand this section

Snyk

6.6 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

7.3 high