NoSQL Injection
Descriptionβ
A NoSQL injection vulnerability occurs when users can insert (or βinjectβ) malicious NoSQL code in a legit SQL query that is built from user-submitted input. A successful NoSQL injection exploit can read sensitive data from the database, modify database data, execute administration operations on the database (such as shutting down the DBMS), recover the content of a given file from the DBMS file system and in some cases issue commands to the operating system.
Remediationβ
The main principle of the remediation is to escape user input properly:
- Allow-list input validation.
- Escaping all user supplied input.
GraphQL Specificβ
Apollo
Yoga
Awsappsync
Graphqlgo
Graphqlruby
Hasura
REST Specificβ
Asp_net
Ruby_on_rails
Next_js
Laravel
Express_js
Django
Symfony
Spring_boot
Flask
Nuxt
Fastapi
Configurationβ
Identifier:
injection/nosql
Optionsβ
- skip_objects : List of object that are to be skipped by the security test.
Examplesβ
Ignore this checkβ
checks:
injection/nosql:
skip: true
Scoreβ
- Escape Severity: HIGH
Complianceβ
OWASP: API9:2023
pci: 6.5.1
gdpr: Article-32
soc2: CC1
psd2: Article-95
iso27001: A.14.2
nist: SP800-53
fedramp: AC-6
Classificationβ
- CWE: 943
Scoreβ
- CVSS_VECTOR: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
- CVSS_SCORE: 9.4