/

CVE-2026-31856

Severity:

CRITICAL RISK

(9.8)

SQL Injection in Parse Server PostgreSQL Increment

CVE-2026-31856

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthenticated / authenticated data exfiltration via SQL injection, potentially bypassing application-level access controls

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Parse Server's PostgreSQL storage adapter contains a SQL injection flaw in how it handles Increment operations on nested object fields using dot notation (for example, stats.counter).

When an attacker can send write requests to the Parse Server REST API, they may inject arbitrary SQL into the generated query and read sensitive data from the database, bypassing Class-Level Permissions (CLPs) and Access Control Lists (ACLs).

Affected context

This vulnerability affects Parse Server deployments that:

  • Use the PostgreSQL storage adapter (MongoDB deployments are not impacted)
  • Allow Increment operations on object fields that use dot notation (e.g., stats.counter)
  • Accept write requests via the Parse Server REST API from clients or integrations

The issue appears when the server constructs SQL statements for these Increment operations and interpolates the amount directly into the query without using parameter binding or enforcing numeric types.

Exploit preconditions

  • Attack surface: Parse Server REST API endpoints that accept write operations (e.g., update, save) involving Increment on nested fields.
  • Required access: Ability to send crafted write requests to the Parse Server instance; this could be via authenticated users, untrusted clients in multi-tenant apps, or any integration with write capabilities.
  • Trigger point: An Increment operation on a nested object field expressed using dot notation (such as stats.counter) with a maliciously crafted amount value.
  • Why exploitation is possible: The amount value from the request is interpolated directly into the SQL query string for PostgreSQL without parameterization or strict type validation, allowing attacker-controlled content to influence the structure of the executed SQL.

Why this happens

The root cause is an insecure query construction pattern in the PostgreSQL storage adapter for Parse Server.

When handling Increment operations on nested object fields addressed via dot notation, the adapter concatenates the user-supplied amount value directly into an SQL fragment instead of using prepared statements with bound parameters.

Because this value is treated as part of the SQL expression rather than as data, an attacker can craft it to introduce arbitrary SQL clauses or subqueries.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where untrusted input is inserted into an SQL command without appropriate escaping, validation, or parameterization.

Potential impact

  • Attackers could read arbitrary rows and columns from PostgreSQL tables, including data they would not normally be authorized to access.
  • Application-layer access controls (CLPs and ACLs) could be bypassed, exposing sensitive user or application data.
  • Integrity of application logic that depends on database confidentiality could be undermined.
  • Depending on surrounding configuration and database permissions, attackers may chain the injection into more advanced SQL operations such as inference attacks or metadata discovery.

General mitigation guidance

Effective mitigation focuses on treating all client-provided values as untrusted data and enforcing strict separation between query structure and parameters:

  • Use parameterized queries or query builders that bind Increment amounts as typed parameters rather than interpolating them into SQL strings.
  • Enforce rigorous type validation for Increment operations, ensuring that only numeric values of expected range and format are accepted before they reach the storage adapter.
  • Centralize database access in well-reviewed abstraction layers that prohibit dynamic SQL construction with string concatenation.
  • Apply defense-in-depth by limiting database roles and permissions so that the application account can access only the minimum required schema and operations.
  • Implement robust server-side schema validation for nested fields and disallow unexpected field paths or operators that can alter query shape.

How teams detect issues like this

Security and engineering teams can look for this class of issues and active exploitation using a combination of code- and runtime-based techniques:

  • Static analysis and review: Scan data access code and storage adapters for string concatenation in SQL queries, especially where request-derived values (such as Increment amounts) appear in SQL fragments or arithmetic expressions without parameter binding.
  • Code review signals: Pay particular attention to custom handling of dot-notation fields, query transformation logic, and any bypasses or special cases around Increment operations, ensuring they follow the same safe patterns as other database interactions.
  • Runtime monitoring: Enable database query logging or application-level observability to detect anomalous SQL patterns (e.g., unexpected UNION, subqueries, or comment markers embedded in Increment clauses).
  • Automated security testing: Use application security testing tools (DAST, SAST, or IAST) configured to probe write endpoints that support Increment operations, validating that request parameters cannot alter the structure of executed SQL.

Sources

SourceLink
github.comgithub.com/parse-community/parse-server/releases/tag/8.6.29
github.comgithub.com/parse-community/parse-server/releases/tag/9.6.0-alpha.3
github.comgithub.com/parse-community/parse-server/security/advisories/GHSA-q3vj-96h2-gwvg

Frequently asked

questions

Yes. Any client or integration that can reach the Parse Server REST API and perform write operations capable of triggering Increment on nested fields could potentially exploit this vulnerability, subject to whatever authentication the API enforces.

It depends on how the Parse Server deployment is configured. If write operations are allowed for unauthenticated clients, the risk is equivalent to unauthenticated SQL injection. If writes require authentication, any account with the ability to perform Increment operations on affected fields could be used as a vehicle for attack.

The safest fix is to ensure that all SQL statements use parameterized queries and that the Increment amount is strictly treated as a numeric parameter. This should be combined with schema-aware validation that rejects non-numeric or malformed values before they reach the database layer.

Adopt a standard data access layer that forbids string-based SQL assembly, enforce strict input validation at the API boundary, and add security-focused code review checks around any logic that translates API operations (such as Increment or dot-notation field updates) into database queries. Complement these practices with regular automated scans for SQL injection sinks in the codebase.

Find out what's already
exploitable in your codebase.