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

GHSA-W42G-7VFC-XF37

Introspection in schema validation in Apollo Server

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -1 d de la divulgación
Exposición2.359 dDesde la divulgación, 5 jun 2020, 2:38 p. m.
Detección2.355 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 la severidad declarada por GHSA (media) 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.
Parche en la próxima ventana y listo, campeón.Sin prisa pero sin pausa, como yo en el páramo.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 2.14.2
Parche 3.0.0
Monitoreo
Detectada
4 jun 20
5 jun 20
31 ago 20
7 jul 21
17 nov 26
21 nov 26
4 jun 20
16 ene 22
29 ago 23
10 abr 25
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 2.14.2 apollo-server · -1 d desde divulgación
Divulgación Publicada GHSA-W42G-7VFC-XF37 divulgada
Divulgación Modificada Última actualización del registro
Remediación Parche 3.0.0 apollo-server-cache-memcached · 397 d desde divulgación
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

We encourage all users of Apollo Server to read this advisory in its entirety to understand the impact. The _Resolution_ section contains details on patched versions.

Impact

If `subscriptions: false` is passed to the `ApolloServer` constructor options, there is no impact. If implementors were not expecting validation rules to be enforced on the WebSocket subscriptions transport and are unconcerned about introspection being enabled on the WebSocket subscriptions transport (or were not expecting that), then this advisory is not applicable. If `introspection: true` is passed to the `ApolloServer` constructor options, the impact is limited to user-provided validation rules (i.e., using `validationRules`) since there would be no expectation that introspection was disabled.

The enforcement of user-provided validation rules on the HTTP transport is working as intended and is unaffected by this advisory. Similarly, disabling introspection on the HTTP transport is working as intended and is unaffected by this advisory.

> Note: Unless `subscriptions: false` is explicitly passed to the constructor parameters of `new ApolloServer({ ... })`, subscriptions are enabled by default, whether or not there is a `Subscription` type present in the schema. As an alternative to upgrading to a patched version, see the _Workarounds_ section below to disable subscriptions if it is not necessary.

In cases where `subscriptions: false` is not explicitly set, the subscription server is impacted since validation rules which are enforced on the main request pipeline within Apollo Server were not being passed to the `SubscriptionServer.create` invocation (seen here, prior to the patch https://github.com/apollographql/apollo-server/blob/7d6f23443e52a90deb74f152f34bb76eea78ee19/packages/apollo-server-core/src/ApolloServer.ts#L677-L726).

The omitted validation rules for the subscription server include any `validationRules` passed by implementors to the `ApolloServer` constructor which were expected to be enforced on the subscriptions WebSocket endpoint. Additionally, because an internal `NoIntrospection` https://github.com/apollographql/apollo-server/blob/7d6f23443/packages/apollo-server-core/src/ApolloServer.ts#L77-L88 validation rule is used to disable introspection, it would have been possible to introspect a server on the WebSocket endpoint that the `SubscriptionServer` creates even though it was not possible on other transports (e.g. HTTP).

The severity of risk depends on whether sensitive information is being stored in the schema itself. The contents of schema descriptions, or secrets which might be revealed by the names of types or field names within those types, will determine the risk to individual implementors.

Affected packages

The bug existed in `apollo-server-core` versions prior to version 2.14.2, however, this means all integration packages (e.g., `apollo-server-express`, etc.) prior to version 2.14.2 which depend on `apollo-server-core` for their subscriptions support are affected. This includes the `apollo-server` package that automatically provides an Express server.

Therefore, for officially published Apollo Server packages, the full list of affected packages includes: `apollo-server`, `apollo-server-azure-functions`, `apollo-server-cache-memcached`, `apollo-server-core`, `apollo-server-cloud-functions`, `apollo-server-cloudflare`, `apollo-server-express`, `apollo-server-fastify`, `apollo-server-hapi`, `apollo-server-koa`, `apollo-server-lambda`, and `apollo-server-micro`.

> Note: The full list included here doesn't fit into the box provided by the GitHub Security Advisories form.

Resolution

The problem is resolved in Apollo Server versions 2.14.2 or higher. If upgrading is not an option, see _Workarounds_ below. When upgrading, ensure that the affected integration package (e.g., `apollo-server-express`) and the `apollo-server-core` package are both updated to the patched versions. (The version numbers should both be 2.14.2.)

Workarounds

Upgrading to a patched version is the recommended solution. If upgrading is not an option, subscriptions can be disabled with `subscriptions: false` to resolve the impact. Disabling subscriptions in this way will disable _all_ subscriptions support and the WebSocket transport:

const server = new ApolloServer({
  subscriptions: false,
  /* Other options, such as typeDefs, resolvers, schema, etc. */
});

### For more information
If you have any questions or comments about this advisory, please open an issue https://github.com/apollographql/apollo-server/issues/new and the maintainers will try to assist.

Credit and appreciation

Apollo fully believes in ethical disclosure of vulnerabilities by security researchers who notify us with details and provide us time to address and fix the issues before publicly disclosing.

Credit for this discovery goes to the team at Bitwala https://www.bitwala.com/, who reported the concern to us responsibly after discovering it during their own auditing.

Versiones

Rangos afectados

Afectada Corregida Última
apollo-server · apollo-server-azure-functions · apollo-server-cache-memcached · apollo-server-core · apollo-server-cloud-functions · apollo-server-cloudflare · apollo-server-express · apollo-server-fastify · apollo-server-hapi · apollo-server-koa · apollo-server-lambda · apollo-server-micro< 2.14.2
2.14.2
3.3.1
3.13.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmapollo-server
Corregida 2.14.2 -1 d 3.13.0 no afectada
npmapollo-server-azure-functions
Corregida 2.14.2 -1 d 3.13.0 no afectada
npmapollo-server-cache-memcached
Corregida 3.0.0 397 d 3.3.1 no afectada
npmapollo-server-core
Corregida 2.14.2 -1 d 3.13.0 no afectada
npmapollo-server-cloud-functions
Corregida 2.14.2 -1 d 3.13.0 no afectada
Versiones corregidas2.14.23.0.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/advisories/GHSA-w42g-7vfc-xf37
Otrahttps://github.com/apollographql/apollo-server/security/advisories/GHSA-w42g-7vfc-xf37
Otrahttps://github.com/apollographql/apollo-server/commit/e2e816316f5c28a03de2ee1589edb2b10c358114
Otrahttps://www.npmjs.com/advisories/1525
Otrahttps://www.npmjs.com/advisories/1526
Otrahttps://www.npmjs.com/advisories/1527
Otrahttps://www.npmjs.com/advisories/1528
Otrahttps://www.npmjs.com/advisories/1529
Otrahttps://www.npmjs.com/advisories/1530
Otrahttps://www.npmjs.com/advisories/1531
Otrahttps://www.npmjs.com/advisories/1532
Otrahttps://www.npmjs.com/advisories/1533
Ver 3 referencias más
Otrahttps://www.npmjs.com/advisories/1534
Otrahttps://www.npmjs.com/advisories/1535
Otrahttps://www.npmjs.com/advisories/1536

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