llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · apostrophe

GHSA-3FM4-523M-GCR5

CSRF protection can be bypassed from a same-site sibling subdomain

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.3
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/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ón9 dDesde la divulgación, 11 nov 2026, 3:28 p. m.
Detección6 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 4.34.1
Monitoreo
Detectada +1
11 nov 26
18 nov 26
21 nov 26
11 nov 26
14 nov 26
16 nov 26
18 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-3FM4-523M-GCR5 divulgada · CVSS 5.3 (GitHub)
Divulgación Modificada Última actualización del registro
Remediación Parche 4.34.1 apostrophe · 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

Apostrophe's default CSRF middleware accepts a fixed CSRF cookie value (`csrf`) and relies on `SameSite=Lax` to prevent cross-origin requests. A page hosted on a sibling subdomain is cross-origin but still same-site. If an attacker can control such a subdomain, the victim's browser can attach the CMS cookies to a forged state-changing request, and the fixed-value check succeeds.

This is conditional on the deployment: the attacker must control or compromise a sibling subdomain under the same site, and the victim must be logged in and authorized for the requested action. This does not bypass Apostrophe's normal authorization checks.

Details

Reviewed against Apostrophe 4.34.0, commit `c534efaf018fcd86c33c41aedf2445302beb09d2`.

The default session cookie uses `SameSite=Lax`:

_.defaults(sessionOptions.cookie, {
  path: '/',
  httpOnly: true,
  secure: false,
  sameSite: 'lax'
});

Source: `express/index.js:595–605` https://github.com/apostrophecms/apostrophe/blob/c534efaf018fcd86c33c41aedf2445302beb09d2/packages/apostrophe/modules/@apostrophecms/express/index.js#L595-L605

Safe requests set a CSRF cookie to a constant value:

res.cookie(self.apos.csrfCookieName, 'csrf', {
  ...self.sessionOptions.cookie,
  maxAge: 31536000
});

Unsafe requests only check for that constant value:

if (req.cookies[self.apos.csrfCookieName] !== 'csrf') {
  res.statusCode = 403;
  return res.send({ name: 'forbidden', message: 'CSRF exception' });
}

Source: `express/index.js:693–719` https://github.com/apostrophecms/apostrophe/blob/c534efaf018fcd86c33c41aedf2445302beb09d2/packages/apostrophe/modules/@apostrophecms/express/index.js#L693-L719

This middleware does not validate the request's `Origin` or `Referer`. Same-site and same-origin are different browser concepts; a cross-origin HTML form can send a request even though its page cannot read the response. See MDN's CSRF guidance https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/CSRF.

One state-changing route is page publishing:

post: {
  ':_id/publish': async (req) => {
    // ...find draft...
    return self.publish(req, draft);
  }
}

Source: `page/index.js:690–708` https://github.com/apostrophecms/apostrophe/blob/c534efaf018fcd86c33c41aedf2445302beb09d2/packages/apostrophe/modules/@apostrophecms/page/index.js#L690-L708

The publish permission check remains in place, so the issue is request forgery as the victim, not an authorization bypass:

Source: `doc/index.js:214–224` https://github.com/apostrophecms/apostrophe/blob/c534efaf018fcd86c33c41aedf2445302beb09d2/packages/apostrophe/modules/@apostrophecms/doc/index.js#L214-L224

Proof of concept
  1. The CMS is served from `cms.example.com`.
  2. An attacker can host content on `evil.example.com` (or compromise another sibling subdomain).
  3. A CMS user with publish permission is logged in and visits the attacker's page.
  4. The page submits a cross-origin `POST` to a known CMS publish endpoint, such as `/api/v1/@apostrophecms/page/<draft-id>/publish`.
  5. Because the request is same-site, `SameSite=Lax` does not provide an origin boundary between the sibling subdomains. The browser sends the CMS cookies to the CMS host, including the CSRF cookie; its constant value passes the middleware check.

The attacker does not need to read the response. The action executes with the victim's existing permissions. The scenario does not apply when the attacker cannot control any same-site origin, or when the victim lacks permission for the action.

Impact

Use an unpredictable CSRF token bound to the user's session and require it on every unsafe request. Also validate `Origin` against the exact application origin as defense in depth. `SameSite` should remain an additional control, not the only CSRF boundary; changing `Lax` to `Strict` alone does not distinguish sibling subdomains.

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:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
apostrophe< 4.34.1
4.34.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmapostrophe
Corregida 4.34.1 0 d 4.34.1 no afectada
Versiones corregidas4.34.1
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/apostrophecms/apostrophe/security/advisories/GHSA-3fm4-523m-gcr5

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