{"id":"CVE-2021-32770","aliases":["CVE-2021-32770","GHSA-rqjw-p5vr-c695"],"related":[],"kind":"vulnerability","state":"published","title":"Basic-auth app bundle credential exposure in gatsby-source-wordpress","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe 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.\n\nExample affected gatsby-config.js:\n```\n      resolve: 'gatsby-source-wordpress',\n        auth: {\n          htaccess: {\n            username: leaked_username\n            password: leaked_password,\n          },\n        },\n```\n\n### Patches\nA 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`.\n\n\n### Workarounds\nThere is no known workaround at this time, other than manually editing the app.js file post-build.\n\n\n### For more information\nEmail us at [security@gatsbyjs.com](mailto:security@gatsbyjs.com)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-07-15T18:30:11.000Z","modified":"2026-07-08T06:29:24.203Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-200","CWE-522"],"affected":[{"ranges":[{"version":"< 4.0.8","status":"affected"},{"version":">= 5.0.0, < 5.9.2","status":"affected"}],"vendor":"gatsbyjs","product":"gatsby","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.0.8"}],"ecosystem":"npm","package":"gatsby-source-wordpress","purl":"pkg:npm/gatsby-source-wordpress","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.9.2"}],"ecosystem":"npm","package":"gatsby-source-wordpress","purl":"pkg:npm/gatsby-source-wordpress","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.0.8"},{"status":"affected","introduced":"5.0.0","fixed":"5.9.2"}],"vendor":"gatsbyjs","product":"gatsby-source-wordpress","cpe":"cpe:2.3:a:gatsbyjs:gatsby-source-wordpress:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-rqjw-p5vr-c695","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32770","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32770","url":"https://www.cve.org/CVERecord?id=CVE-2021-32770","licence":"CVE Terms of Use","modified":"2024-08-03T23:33:56.071Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rqjw-p5vr-c695","url":"https://github.com/advisories/GHSA-rqjw-p5vr-c695","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:24.203Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32770","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32770","licence":"Public domain","modified":"2026-06-17T03:53:35.677Z"}],"updatedAt":"2026-11-25T22:58:02.682Z","epss":{"score":0.01414,"percentile":0.73514,"date":"2026-12-01T12:00:22.000Z"}}