CVE-2021-32770
JSON

7.5high

Basic-auth app bundle credential exposure in gatsby-source-wordpress

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
1.41% (higher than 73% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rqjw-p5vr-c695

Description

Gatsby is a framework for building websites. The gatsby-source-wordpress plugin prior to versions 4.0.8 and 5.9.2 leaks .htaccess HTTP Basic Authentication variables into the app.js bundle during build-time. Users who are not initializing basic authentication credentials in the gatsby-config.js are not affected. A patch has been introduced in gatsby-source-wordpress@4.0.8 and gatsby-source-wordpress@5.9.2 which mitigates the issue by filtering all variables specified in the `auth: { }` section. Users that depend on this functionality are advised to upgrade to the latest release of gatsby-source-wordpress, run `gatsby clean` followed by a `gatsby build`. One may manually edit the app.js file post-build as a workaround.

Affected

Product or packageVersionsReported by
gatsbyjs gatsby< 4.0.8, >= 5.0.0, < 5.9.2CVE List
gatsby-source-wordpress (npm)before 4.0.8, from 5.0.0 before 5.9.2GitHub Advisory Database
gatsbyjs gatsby-source-wordpressbefore 4.0.8, from 5.0.0 before 5.9.2NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N

Classification

What each source says

CVE List

Gatsby is a framework for building websites. The gatsby-source-wordpress plugin prior to versions 4.0.8 and 5.9.2 leaks .htaccess HTTP Basic Authentication variables into the app.js bundle during build-time. Users who are not initializing basic authentication credentials in the gatsby-config.js are not affected. A patch has been introduced in gatsby-source-wordpress@4.0.8 and gatsby-source-wordpress@5.9.2 which mitigates the issue by filtering all variables specified in the `auth: { }` section. Users that depend on this functionality are advised to upgrade to the latest release of gatsby-source-wordpress, run `gatsby clean` followed by a `gatsby build`. One may manually edit the app.js file post-build as a workaround.

GitHub Advisory Database
Impact

The gatsby-source-wordpress plugin prior to versions 4.0.8 and 5.9.2 leaks .htaccess HTTP Basic Authentication variables into the app.js bundle during build-time. Users who are not initializing basic authentication credentials in the gatsby-config.js are not affected.

Example affected gatsby-config.js:

      resolve: 'gatsby-source-wordpress',
        auth: {
          htaccess: {
            username: leaked_username
            password: leaked_password,
          },
        },
Patches

A patch has been introduced in gatsby-source-wordpress@4.0.8 and gatsby-source-wordpress@5.9.2 which mitigates the issue by filtering all variables specified in the auth: { } section. Users that depend on this functionality are advised to upgrade to the latest release of gatsby-source-wordpress, run gatsby clean followed by a gatsby build.

Workarounds

There is no known workaround at this time, other than manually editing the app.js file post-build.

For more information

Email us at security@gatsbyjs.com

NVD (es)

Gatsby es un framework para la construcción de sitios web. El plugin gatsby-source-wordpress anterior a versiones 4.0.8 y 5.9.2 filtra variables de autenticación básica HTTP .htaccess en el paquete app.js durante el tiempo de construcción. Unos usuarios que no inicializan las credenciales de autenticación básica en el gatsby-config.js no están afectados. Ha sido introducido un parche en gatsby-source-wordpress@4.0.8 y gatsby-source-wordpress@5.9.2 que mitiga el problema al filtrar todas las variables especificadas en la sección "auth: { }". los usuarios que dependen de esta funcionalidad se les aconseja actualizar a la última versión de gatsby-source-wordpress, ejecutar "gatsby clean" seguido de "gatsby build". Se puede editar manualmente el archivo app.js después de la construcción como una solución

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32770 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-rqjw-p5vr-c695 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32770 changed 2026-06-17Public domain