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·83 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

•about 1 hour ago•CVE-2026-129239
6.5

CVE-2026-129239: Privilege Escalation and Unauthorized Data Exposure in Directus SharesService

Directus versions prior to 12.3.1 contain an authorization bypass and privilege management flaw in the SharesService component. Authenticated non-administrative users with update permissions on the directus_shares collection can modify the user_created, role, item, and collection fields of an existing owned share. Because the update operation validates permissions solely against the pre-update record state without revalidating the modified fields, an attacker can reassign share ownership and role context to an administrator. Subsequent guest access using the share token derives administrative accountability, exposing restricted relational data.

Alon Barad
Alon Barad
2 views•10 min read
•about 2 hours ago•CVE-2026-88987
5.4

CVE-2026-88987: Stored Cross-Site Scripting via XHTML and XML Data URIs in Silverstripe Framework

CVE-2026-88987 (GHSA-qqrg-8jpm-8mph) is a stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe Framework prior to version 6.2.13. The framework's HTML sanitization engine, XssSanitiser, relies on an incomplete regular expression denylist when filtering URI schemes in HTML attributes. Specifically, the sanitizer strips data:text/html URIs but fails to restrict executable XML and XHTML media types such as data:application/xhtml+xml, data:text/xml, and data:application/xml. An authenticated user with content creation privileges can embed crafted data URIs inside HTML attributes like iframe src or object data, leading to arbitrary JavaScript execution when the content is rendered by a victim's browser.

Amit Schendel
Amit Schendel
1 views•9 min read
•about 3 hours ago•CVE-2026-88988
5.4

CVE-2026-88988: Stored Cross-Site Scripting via SVG Data URIs in Silverstripe Framework

A Stored Cross-Site Scripting (XSS) vulnerability exists in Silverstripe Framework versions prior to 6.2.13 within the SilverStripe\Core\XssSanitiser component. The HTML sanitizer fails to strip SVG data URIs (data:image/svg*) from dangerous HTML attributes such as href, src, lowsrc, and data. Authenticated CMS authors can persist crafted SVG data URIs in stored content, leading to arbitrary JavaScript execution in the browser context of users who view or interact with the rendered page.

Alon Barad
Alon Barad
3 views•9 min read
•about 4 hours ago•CVE-2026-88989
4.3

CVE-2026-88989: Authorization Bypass in Silverstripe Framework GridFieldDetailForm

CVE-2026-88989 (tracked as GHSA-3qh3-54qg-gpq3) is a missing authorization vulnerability (CWE-862) in the Silverstripe Framework affecting versions prior to 6.2.13. The flaw exists within the GridFieldDetailForm_ItemRequest request handler, which orchestrates record creation and editing workflows inside the Silverstripe CMS backend. Specifically, the server-side persistence method saveFormIntoRecord() fails to verify whether an authenticated user possesses the necessary creation permissions (canCreate) when processing an unpersisted DataObject record. Consequently, a low-privileged CMS user who has permission to access a GridField interface and edit existing records can bypass role-based creation restrictions. By sending a crafted HTTP POST request directly to the item/new endpoint with the action_doSave parameter, the user can instantiate and persist unauthorized database records. The vulnerability is rated Medium severity with a CVSS v3.1 base score of 4.3 and is remediated in Silverstripe Framework version 6.2.13.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 5 hours ago•CVE-2026-91112
6.8

CVE-2026-91112: Privilege Escalation via CMS_ACCESS_SecurityAdmin in Silverstripe Framework

Silverstripe Framework prior to version 6.2.13 contains an improper privilege management vulnerability (CWE-269) within the Group authorization and validation logic. A delegated administrator possessing the CMS_ACCESS_SecurityAdmin permission, but lacking full ADMIN privileges, can edit or reparent groups that acquire administrative capabilities indirectly via permission roles or ancestor inheritance. By adding their own account to such a group or moving a controlled group underneath a role-privileged parent, the user escalates to full administrative access across the CMS.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 6 hours ago•CVE-2026-91113
4.3

CVE-2026-91113: Missing Authorization and Arbitrary Record Type Conversion in Silverstripe Framework GridFieldDetailForm

A missing authorization and type validation vulnerability in Silverstripe Framework prior to version 6.2.13 allows authenticated CMS users to convert database records into arbitrary DataObject classes via user-controlled ClassName parameters in GridField detail forms.

Alon Barad
Alon Barad
5 views•9 min read