Skip to content

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

High severity GitHub Reviewed Published Jul 15, 2021 in gatsbyjs/gatsby • Updated Feb 1, 2023

Package

npm gatsby-source-wordpress (npm)

Affected versions

< 4.0.8
>= 5.0.0, < 5.9.2

Patched versions

4.0.8
5.9.2

Description

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

References

@mlgualtieri mlgualtieri published to gatsbyjs/gatsby Jul 15, 2021
Published by the National Vulnerability Database Jul 15, 2021
Reviewed Jul 15, 2021
Published to the GitHub Advisory Database Jul 19, 2021
Last updated Feb 1, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

0.383%
(74th percentile)

CVE ID

CVE-2021-32770

GHSA ID

GHSA-rqjw-p5vr-c695

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.