llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · signalk-server

GHSA-Q7MC-WH43-5H8X

Prototype Pollution via Delta Context/Path in DeltaCache

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
3.1
Baja
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición99 dDesde la divulgación, 14 ago 2026, 2:08 a. m.
Detección98 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Si esta te quita el sueño, no es por el CVSS.Relájate, esto es más bajo que mi siesta.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 2.31.0
Monitoreo
Detectada +1
14 ago 26
20 nov 26
21 nov 26
14 ago 26
8 sept 26
3 oct 26
28 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-Q7MC-WH43-5H8X divulgada · CVSS 3.1 (GitHub)
Divulgación Modificada Última actualización del registro
Remediación Parche 2.31.0 signalk-server · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

A delta whose context (or context and path) is `__proto__` reaches `Object.prototype` through two independent code paths in `DeltaCache`, letting an authenticated, non-admin `readwrite` user set an arbitrary property on the shared global object — visible to every other request, vessel, and plugin in the same server process, not just the sender's own data. With the default ACL configuration, a `readwrite` principal can already write any value to any path; reaching the JavaScript prototype chain is a different kind of access, outside any data scope a `readwrite` grant reaches even with ACLs disabled. Concretely, this lets the same principal cause a disabled plugin to be silently started (real code execution, via a plugin-configuration check that reads a property without checking it's the object's own) or to appear enabled in the webapp list.

Details

`handleMessage` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/index.ts#L487-L499 only rewrites `context` when it is `undefined` or exactly `'vessels.self'`; any other string passes through unchanged. `isValidUpdate` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/index.ts#L1064-L1084 only requires `values[].path` to be a string. The WebSocket write path gates on `shouldAllowWrite` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/interfaces/ws.ts#L963 before forwarding to `handleMessage` — an authenticated `readwrite`, non-admin principal reaches both sinks below.

`getLeafObject` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/deltacache.ts#L1591-L1611 walks `current[p]` for each context/path segment. When `p` is `'__proto__'`, `current[p]` is already defined — it's the live `Object.prototype` every plain object inherits — so the walk re-points `current` to it without creating anything. The next segment is then undefined there, and gets written directly onto the real `Object.prototype`.

`getContextAndPathParts`'s cache write https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/deltacache.ts#L212-L230 is a second, independent path: `this.cachedContextPaths['__proto__']` always reads back truthy for the same reason, so the "create if missing" guard never fires, and `this.cachedContextPaths['__proto__'][msg.path] = ...` writes straight onto `Object.prototype` — context alone needs to be `'__proto__'`, no second path segment required.

Not the same root cause as `GHSA-qh3j-mrg8-f234` (prototype *read* via the `from` field bypass in `/signalk/v1/applicationData`) — that endpoint's own guard (`DANGEROUS_PATH_SEGMENTS`/`isPrototypePollutionPath`, `applicationData.js#L53-L65` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/interfaces/applicationData.js#L53-L65) is a different code path and isn't applied to delta ingestion. Also related: `306a64ef` ("fix(server-api): drop delta paths with prototype keys") fixed the same bug class in a sibling cache — `addValue` in `packages/server-api/src/fullsignalk.ts` — reachable from the same kind of delta. That fix doesn't cover `DeltaCache`, which is a separate tree with its own walk logic.

PoC

Against the real, unmodified `DeltaCache.ingestDelta`, the function `index.ts#L341` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/index.ts#L341 calls for every delta:

cache.ingestDelta({
  context: '__proto__',
  updates: [{
    $source: 'poc',
    values: [{ path: 'pocPollutedFlag', value: 'pwned' }]
  }]
})

const unrelatedObject = {}
// .pocPollutedFlag is now defined on it.

Output:

✔ a single delta from an authenticated non-admin principal pollutes Object.prototype server-wide
1 passing (2ms)

Evaluating the exact expressions from `plugins.ts` and `webapps.ts` against a bare `{}` (what `getPluginOptions` returns for any never-configured plugin) before and after the same `ingestDelta` call above:

const before = JSON.parse('{}')
if (before.enabled) { /* plugins.ts:1063 */ }        // does not fire

cache.ingestDelta({
  context: '__proto__',
  updates: [{ $source: 'poc', values: [{ path: 'enabled', value: true }] }]
})

const after = JSON.parse('{}')                        // a different, unrelated plugin's options
if (after.enabled) { /* plugins.ts:1063 */ }           // fires
after?.enabled ?? false                                // webapps.ts:70 -- also truthy

Output:

✔ flips a never-configured plugin's options.enabled from absent to truthy
✔ flips webapps.ts's isPluginEnabled check the same way
2 passing (3ms)
Impact

An authenticated, non-admin `readwrite` principal can set arbitrary properties on `Object.prototype`, affecting every other request, every other vessel's data, and every plugin loaded in the same process. Reachable via two independent code paths, either alone sufficient. Two real places in the codebase turn that write into concrete behaviour:

  • `getPluginOptions` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/interfaces/plugins.ts#L332-L347 returns `JSON.parse('{}')` — an object with no own properties — for any plugin that has never had its configuration saved. That object is read at `plugins.ts#L1063` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/interfaces/plugins.ts#L1063: `if (options.enabled) { doPluginStart(...) }`, which calls the plugin's real `start()` function with full server privileges. Pollute `enabled` and the next time an admin saves configuration for *any* never-configured plugin, a *different*, deliberately dormant plugin silently starts.
  • `isPluginEnabled` https://github.com/SignalK/signalk-server/blob/8dbc27e2b4bb2f32ad112acd8b89efaf77f9af99/src/interfaces/webapps.ts#L61-L70 reads the same kind of options object with `options?.enabled ?? false` — `??` only falls back for `null`/`undefined`, so a polluted value passes through. This feeds `GET /webapps`, which needs only an authenticated principal, not admin — the same `readwrite` attacker can trigger it directly, no admin action required, and get a disabled plugin's webapp listed as available.
Suggested fix
+const DANGEROUS_PATH_SEGMENTS = ['__proto__', 'constructor', 'prototype']
+
 function getLeafObject(start, contextAndPathParts, createIfMissing = false, returnLast = false) {
   for (...) {
     const p = contextAndPathParts[i]
+    if (DANGEROUS_PATH_SEGMENTS.includes(p)) return null
     ...
 getContextAndPathParts(msg) {
   let result
   if (this.cachedContextPaths[msg.context] && (result = ...)) {
     return result           // unchanged: cache-hit fast path
   }
   let contextAndPathParts = ...
+  if (contextAndPathParts.some((p) => DANGEROUS_PATH_SEGMENTS.includes(p))) {
+    return contextAndPathParts   // uncached; getLeafObject rejects it too
+  }
   ...

Plus null-checks at the two call sites that assumed a truthy result. The diff is above — it matches the guard already used in `src/interfaces/applicationData.js` and in `306a64ef`, applied here where it's currently missing.

Notes

Found via automated static analysis, manually reproduced and verified with the working PoC above. Happy to help with anything else, including code review of a fix.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
signalk-server≤ 2.30.0
2.30.0
2.37.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmsignalk-server
Corregida 2.31.0 0 d 2.37.0 no afectada
Versiones corregidas2.31.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/SignalK/signalk-server/security/advisories/GHSA-q7mc-wh43-5h8x

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.