CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-52887

CVE-2026-52887: Critical SQL Injection and Remote Code Execution in NocoBase

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 1, 2026·7 min read·3 visits

Executive Summary (TL;DR)

SQL injection via Sequelize.literal in NocoBase's in-app message plugin allows authenticated attackers to execute stacked queries and achieve OS command execution via PostgreSQL.

A critical SQL injection vulnerability exists in the @nocobase/plugin-notification-in-app-message plugin of NocoBase prior to version 2.0.61. The flaw is caused by direct string interpolation of user-controlled input into a Sequelize.literal() query, allowing authenticated users to execute stacked PostgreSQL queries and achieve remote code execution on the underlying database server.

Vulnerability Overview

NocoBase is an open-source, AI-powered no-code and low-code platform designed to build business applications and internal tools. The application architecture relies on a modular plugin system to provide core features, including user management, workflows, and notifications. The vulnerability resides specifically within the @nocobase/plugin-notification-in-app-message plugin, which handles in-app notification channels and messaging capabilities.

This plugin exposes a resource action handler called defineMyInAppChannels, which is routed to the HTTP endpoint GET /api/myInAppChannels:list. This endpoint is designed to allow users to retrieve lists of notification channels, applying server-side filters such as timestamps. Because this endpoint handles notifications, it is exposed to authenticated (signed-up) platform users, creating an internal attack surface.

The vulnerability is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). Input supplied to the query filters is evaluated in an unsafe raw SQL context. An attacker who has achieved standard user registration on a NocoBase deployment can exploit this flaw to execute arbitrary database queries, bypass security boundaries, and gain complete control over the underlying PostgreSQL server.

Root Cause Analysis

The root cause of CVE-2026-52887 lies in the insecure configuration and utilization of the Sequelize Object-Relational Mapper (ORM). When building relational queries in Sequelize, developers can use abstraction structures like operators (e.g., Op.and, Op.or, Op.lt) or direct queries. However, when complex database-specific functionality is required, developers often resort to using the Sequelize.literal() function.

The Sequelize.literal() function is designed to insert raw SQL fragments directly into the query generator. Because Sequelize treats the input of Sequelize.literal() as trusted developer-defined code, it completely bypasses the built-in sanitization, quoting, and parameterized binding mechanisms. Any string passed into this function is directly concatenated into the final SQL query sent to the database backend.

In the affected versions of NocoBase, the backend extracts query filters directly from the HTTP query parameters using the context action: const { filter = {}, limit = 30 } = ctx.action?.params ?? {};. When processing the filter[latestMsgReceiveTimestamp][$lt] parameter, the application attempts to filter messages by a specified cut-off timestamp. The code checks for the existence of this key and interpolates the raw, unvalidated string directly into the template literal passed to Sequelize.literal(). This direct interpolation merges user input with SQL commands before execution, resulting in an SQL injection vulnerability.

Code Analysis

An analysis of the source code changes in commit 68d64e3fcfb8be2ae4f3bfc9e1ee3f85b87c89ce highlights the exact location of the security flaw and the engineering changes applied to fix it.

Prior to the security patch, the query filter for the timestamp was constructed dynamically using raw string template interpolation:

// VULNERABLE CODE
const latestMsgReceiveTSFilter = filter?.latestMsgReceiveTimestamp?.$lt
  ? Sequelize.literal(`${latestMsgReceiveTimestampSQL} < ${filter.latestMsgReceiveTimestamp.$lt}`)
  : null;

In the vulnerable implementation above, if the client sends a request containing filter[latestMsgReceiveTimestamp][$lt]=1) OR 1=1 --, the string is appended directly to the SQL fragment. This alters the query logic, allowing attackers to access unauthorized resources or execute stacked commands.

The patch addresses this vulnerability by introducing strict schema enforcement and refactoring the query interface to use standard Sequelize validation rules and parameter binding:

// SECURE PATCH IMPLEMENTATION
function parseLatestMsgReceiveTimestampLt(filter: unknown) {
  const latestMsgReceiveTimestamp =
    typeof filter === 'object' && filter !== null
      ? (filter as { latestMsgReceiveTimestamp?: unknown }).latestMsgReceiveTimestamp
      : null;
  if (
    typeof latestMsgReceiveTimestamp !== 'object' ||
    latestMsgReceiveTimestamp === null ||
    !Object.prototype.hasOwnProperty.call(latestMsgReceiveTimestamp, '$lt')
  ) {
    return null;
  }
 
  const value = (latestMsgReceiveTimestamp as { $lt?: unknown }).$lt;
  if (typeof value === 'string' && value.trim() === '') {
    throw new Error('Invalid latest message receive timestamp filter');
  }
  if (typeof value !== 'number' && typeof value !== 'string') {
    throw new Error('Invalid latest message receive timestamp filter');
  }
 
  const timestamp = Number(value);
  if (!Number.isFinite(timestamp)) {
    throw new Error('Invalid latest message receive timestamp filter');
  }
 
  return timestamp;
}

Additionally, the patch replaces the Sequelize.literal() comparison with an explicit Sequelize operator construct:

// SECURE PATCH IMPLEMENTATION (FILTER GENERATION)
const latestMsgReceiveTSFilter =
  latestMsgReceiveTimestampLt !== null
    ? Sequelize.where(Sequelize.literal(latestMsgReceiveTimestampSQL), Op.lt, latestMsgReceiveTimestampLt)
    : null;

By leveraging Sequelize.where combined with Op.lt, the application safely maps the strictly-validated floating point number latestMsgReceiveTimestampLt to a bound database parameter. Because the database driver executes this as a prepared parameter, the input is never evaluated as raw SQL. The remediation is highly complete because the type-casting helper actively rejects non-numeric strings, blocking any payload containing SQL syntax.

Exploitation & Attack Methodology

To successfully exploit this vulnerability, an attacker requires network access to the NocoBase API endpoint and valid session credentials. In many default NocoBase deployments, public user registration is enabled, allowing anyone to register a basic account and acquire an active JSON Web Token (JWT) session.

The attack begins by crafting an HTTP GET request targeting /api/myInAppChannels:list with an engineered filter query parameter. Since the database engine behind NocoBase is typically PostgreSQL, and the Node.js database connector (node-pg) permits stacked queries by default, statements can be chained using a semicolon.

An attacker can execute administrative tasks or shell commands on the server by leveraging PostgreSQL's COPY ... TO PROGRAM directive. This command spawns an OS shell and executes arbitrary commands as the database runtime user. The following payload sequence illustrates this attack pathway:

GET /api/myInAppChannels:list?filter[latestMsgReceiveTimestamp][$lt]=1); COPY (SELECT 'exploit') TO PROGRAM 'id' -- HTTP/1.1
Host: target-nocobase.local
Authorization: Bearer <JWT_TOKEN>

If the database connection possesses sufficient privileges (which is common in containerized environments where the database user is configured as postgres or superuser), the injected OS command executes within the context of the database container, leading to Remote Code Execution.

Technical Impact Assessment

The technical impact of CVE-2026-52887 is evaluated as Critical, carrying a maximum CVSS v3.1 Base Score of 10.0. The vulnerability allows an authenticated attacker to execute arbitrary command structures inside the environment, resulting in a total compromise of confidentiality, integrity, and availability.

While the CVSS vector assigns 'Privileges Required: None' in some databases, the vulnerability requires authenticated access. However, because self-registration is often exposed on low-code platforms, this prerequisite is easily satisfied. The scope is defined as Changed (S:C) because exploitation allows an attacker to transition from the application database security context directly to the container's operating system environment.

In deployments utilizing standard Docker Compose files, the PostgreSQL process frequently runs with administrative privileges. This design flaw allows an attacker to compromise the entire container network, extract database credentials, manipulate application source files, or initiate lateral movement into the cloud hosting environment.

Remediation & Defensive Controls

The primary defense against CVE-2026-52887 is updating NocoBase to version 2.0.61 or later, which incorporates the structural type validation and parameter binding patches. If an immediate upgrade is not feasible, several defensive controls can be implemented to mitigate risk.

First, restrict PostgreSQL database permissions. Ensure the database user used by NocoBase is not configured with SUPERUSER privileges. Execute the following SQL commands to revoke dangerous execution permissions from application databases:

ALTER USER nocobase WITH NOSUPERUSER;
REVOKE EXECUTE ON FUNCTION pg_read_file(text) FROM public;
REVOKE EXECUTE ON FUNCTION pg_write_file(text, text, boolean) FROM public;

Second, deploy Web Application Firewall (WAF) rules to inspect incoming query parameters on the affected endpoint. The following ModSecurity rule can be utilized to block malicious patterns in the timestamp filter:

SecRule REQUEST_FILENAME "@rx /api/myInAppChannels:list" \
    "id:100001,phase:2,deny,status:400,log,msg:'Block SQLi in myInAppChannels Filter',\
    chain"
    SecRule ARGS:filter[latestMsgReceiveTimestamp][$lt] "@rx [^0-9]" "t:none"

Implementing these controls reduces the attack surface, preventing exploitation of raw string interpolation before a platform-wide patch is applied.

Official Patches

nocobaseCore repair commit implementing safe typecasting and binding.

Fix Analysis (2)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
0.59%
Top 55% most exploited

Affected Systems

NocoBase installations prior to version 2.0.61 running the @nocobase/plugin-notification-in-app-message plugin

Affected Versions Detail

Product
Affected Versions
Fixed Version
@nocobase/plugin-notification-in-app-message
nocobase
< 2.0.612.0.61
AttributeDetail
CWE IDCWE-89
Attack VectorNetwork (AV:N)
CVSS Score10.0 (Critical)
EPSS Score0.00593 (Percentile: 44.98%)
ImpactRemote Code Execution (RCE) / Full Database Compromise
Exploit StatusProof of Concept (PoC)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream database.

Known Exploits & Detection

GitHub AdvisoryOfficial Security Advisory detailing technical mechanisms and mitigation routes.

References & Sources

  • [1]GitHub Security Advisory GHSA-p849-8hwh-84j9
  • [2]NocoBase Code Fix Commit 68d64e3fcfb
  • [3]CVE-2026-52887 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•12 minutes ago•CVE-2026-53466
6.5

CVE-2026-53466: Integer Conversion Overflow in ImageMagick XCF Decoder

An integer conversion overflow vulnerability exists in the XCF decoder of ImageMagick before version 6.9.13-51 and 7.1.2-26. The issue arises from mixed-type arithmetic that promotes calculation results to floating-point representations, causing an undefined cast back to integer. Under optimizing compilers, this undefined behavior results in bounds checks being bypassed, allowing out-of-bounds heap reads.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 1 hour ago•CVE-2026-53599
7.5

CVE-2026-53599: Authenticated Remote Code Execution in REDAXO CMS via Mediapool File Upload Validation Bypass

An authenticated file upload validation bypass vulnerability exists in the REDAXO CMS Mediapool addon in versions 5.18.2 through 5.21.0. Under permissive web server configurations, this allows authenticated users with media upload privileges to achieve remote code execution via multi-segment extension file uploads.

Alon Barad
Alon Barad
0 views•7 min read
•about 3 hours ago•CVE-2026-53606
5.4

CVE-2026-53606: Stored Cross-Site Scripting (XSS) via Unsanitized URI-bearing Attributes in sanitize-html

An incomplete default configuration vulnerability in sanitize-html prior to version 2.17.5 allows remote attackers to execute arbitrary JavaScript code via crafted HTML payloads containing neglected URI-bearing attributes (e.g., action, formaction, data, xlink:href) that bypass input validation logic.

Alon Barad
Alon Barad
2 views•6 min read
•about 4 hours ago•CVE-2026-53609
9.1

CVE-2026-53609: Server-Side Prototype Pollution in ApostropheCMS

A critical server-side prototype pollution vulnerability in ApostropheCMS versions up to and including 4.30.0 allows authenticated editors to write arbitrary properties to the global Object.prototype via patch operators. Exploiting a confirmed gadget in publicApiCheck() bypasses authorization on all piece-type REST API endpoints framework-wide, persisting for the lifetime of the Node.js process.

Alon Barad
Alon Barad
2 views•6 min read
•about 5 hours ago•CVE-2026-53607
3.7

CVE-2026-53607: Server-Side Request Forgery in ApostropheCMS via Host Header Manipulation

An unauthenticated Server-Side Request Forgery (SSRF) vulnerability exists in ApostropheCMS versions up to and including 4.30.0. When the prettyUrls option is enabled in the @apostrophecms/file module, the server constructs internal self-requests using the client-provided HTTP Host header, allowing remote attackers to coerce the server into initiating outbound requests to arbitrary internal or external hosts.

Alon Barad
Alon Barad
3 views•8 min read
•about 6 hours ago•CVE-2026-53608
8.7

CVE-2026-53608: Stored Cross-Site Scripting in @apostrophecms/seo via Unsanitized Tracking IDs

A stored Cross-Site Scripting (XSS) vulnerability exists in the @apostrophecms/seo package of the ApostropheCMS ecosystem up to and including version 1.4.2. Unsanitized user inputs for Google Analytics and Google Tag Manager IDs are injected directly into script elements within the document header, enabling authenticated editors to execute arbitrary JavaScript in the context of all site visitors.

Alon Barad
Alon Barad
5 views•5 min read