GHSA-4H2P-8HGR-4XGQ
SSRF bypass via IPv4-mapped IPv6 hex notation in core plugins (bypass of CVE-2026-55412)
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4H2P-8HGR-4XGQ divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The SSRF protection in ToolJet's core built-in plugins (plugins/packages/common/lib/ssrf-protection.ts) fails to block IPv4-mapped IPv6 addresses in hex notation. The isPrivateIPv6 function checks only dotted-decimal form (::ffff:127.0.0.1) but not hex form (::ffff:7f00:1). Since the WHATWG URL parser normalizes dotted notation to hex, both forms bypass the check. The bypass persists even when SSRF_PROTECTION_ENABLED and SSRF_DNS_RESOLUTION_CHECK are both enabled, because createSSRFSafeLookup uses the same flawed isPrivateIP function. The marketplace copy of the file already has the fix (lines 303-313), but it was never propagated to the core plugins copy. This is a bypass of CVE-2026-55412 (GHSA-h49f-mhmm-jx4w).
Details
Root Cause
In `plugins/packages/common/lib/ssrf-protection.ts`, the `isPrivateIPv6` function:
// Line 255-265
if (normalized.includes('::ffff:')) {
const ipv4Part = normalized.split('::ffff:')[1];
if (ipv4Part) {
if (ipv4Part.includes('.')) { // <-- Only checks dotted notation
return isPrivateIP(ipv4Part);
}
// HEX FORM (e.g., '7f00:1') FALLS THROUGH HERE -- NOT CHECKED
}
}
return false; // <-- Returns false for hex form = BYPASSThe WHATWG URL parser normalizes `[::ffff:127.0.0.1]` to hostname `::ffff:7f00:1` (hex form). So even `http://[::ffff:127.0.0.1]/` bypasses the check after URL normalization.
The custom DNS lookup function (`createSSRFSafeLookup`) also calls the same `isPrivateIP`, so the bypass persists even when both `SSRF_PROTECTION_ENABLED` and `SSRF_DNS_RESOLUTION_CHECK` are enabled.
Code comparison: core plugins vs marketplace
The marketplace copy (`marketplace/plugins/common/lib/ssrf-protection.ts` lines 303-313) already handles hex notation:
} else {
// Hex notation: ::ffff:c0a8:101
const hexParts = ipv4Part.split(':');
if (hexParts.length === 2) {
const high = parseInt(hexParts[0], 16);
const low = parseInt(hexParts[1], 16);
if (!isNaN(high) && !isNaN(low)) {
const dotted = `${(high >> 8) & 0xff}.${high & 0xff}.${(low >> 8) & 0xff}.${low & 0xff}`;
return isPrivateIP(dotted);
}
}
}This correctly converts `7f00:1` to `127.0.0.1` and blocks it. The core plugins copy is missing this else branch.
Suggested Fix
- Propagate the hex-notation handling from `marketplace/plugins/common/lib/ssrf-protection.ts` (lines 303-313) into `plugins/packages/common/lib/ssrf-protection.ts`.
- Consider using `ipaddr.js` instead of manual string parsing.
- Eliminate code duplication between `plugins/` and `marketplace/` copies.
- Consider enabling SSRF protection by default (`SSRF_PROTECTION_ENABLED` defaults to `false`).
Proof of concept
### Prerequisites
- A ToolJet instance (Cloud, or self-hosted with `SSRF_PROTECTION_ENABLED=true`)
- An authenticated user account (any role that can create/run queries)
Steps to reproduce
- Log in to ToolJet and create an application.
- Add a REST API data source (or use a query directly).
- Create a new query with method GET and URL:
- Run the query. The request reaches `127.0.0.1:8080` despite SSRF protection being enabled.
Cloud-specific attack (Azure AKS metadata)
URL: http://[::ffff:a9fe:a9fe]/metadata/instance?api-version=2021-02-01
Header: Metadata: trueThis reaches `169.254.169.254` (Azure IMDS) and can retrieve the managed identity token.
Impact
- Cloud (app.tooljet.com): An authenticated user (including free-tier) can access the Azure IMDS endpoint and obtain the AKS cluster's managed identity token, potentially compromising Azure resources. This is the same impact as CVE-2026-55412 via a different bypass vector.
- Self-hosted (SSRF_PROTECTION_ENABLED=true): Any authenticated user can access internal services (databases, admin panels, cloud metadata endpoints).
Affected components
All core plugins using `validateUrlForSSRF` / `getSSRFProtectionOptions`:
- `plugins/packages/restapi` (RestAPI data source)
- `plugins/packages/graphql` (GraphQL data source)
- `plugins/packages/openapi` (OpenAPI data source)
- `plugins/packages/common/lib/oauth.ts` (OAuth access_token_url)
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmtooljet |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/ToolJet/ToolJet/security/advisories/GHSA-4h2p-8hgr-4xgqLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
