Vulnerabilities in pkg:npm/@redwoodjs/api
PACKAGEGHSA-3qmc-2r76-4rqp is a HIGH (CVSS 8.2) redwood is vulnerable to account vulnerability (General Security Weakness) affecting @redwoodjs/api libraries in the npm ecosystem. The issue involves redwood is vulnerable to account takeover via dbauth "forgot-password". Remediation is available by upgrading affected packages to version 2.2.5, 3.3.1.
pkg:npm/@redwoodjs/api
Vulnerability advisories affecting package pkg:npm/@redwoodjs/api. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3qmc-2r76-4rqp | - | HIGH | Redwood is vulnerable to account takeover via dbAuth "forgot-password" |
GHSA-3qmc-2r76-4rqp at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L).
How to Fix GHSA-3qmc-2r76-4rqp
To remediate this vulnerability, upgrade all affected @redwoodjs/api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @redwoodjs/api@2.2.5
npm install @redwoodjs/api@3.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @redwoodjs/api
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-3qmc-2r76-4rqp, inspect your project dependencies using npm:
npm ls @redwoodjs/api
Analyze the terminal output to locate any version of @redwoodjs/api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.5), your application is affected.
Note: The npm ls @redwoodjs/api command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In @redwoodjs/api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-3qmc-2r76-4rqp Affected @redwoodjs/api Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@redwoodjs/api
|
npm |
≥ 0.38.0
< 2.2.5
|
2.2.5
|
|
@redwoodjs/api
|
npm |
≥ 3.0.0
< 3.3.1
|
3.3.1
|
References
Frequently Asked Questions
What is GHSA-3qmc-2r76-4rqp?
Which @redwoodjs/api versions are affected?
What version fixes GHSA-3qmc-2r76-4rqp?
Is @redwoodjs/api affected?
What is the CVSS score of GHSA-3qmc-2r76-4rqp?
What CWE is associated with GHSA-3qmc-2r76-4rqp?
How can I check npm dependencies for GHSA-3qmc-2r76-4rqp?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3qmc-2r76-4rqp",
"modified" : "2022-11-10T15:51:01Z",
"published" : "2022-11-10T15:51:01Z",
"aliases" : [ ],
"summary" : "Redwood is vulnerable to account takeover via dbAuth \"forgot-password\" ",
"details" : "# Impact\n\n_What kind of vulnerability is it? Who is impacted?_\n\nThis is an API vulnerability in Redwood's [dbAuth], specifically the dbAuth forgot password feature:\n- only projects with the dbAuth \"forgot password\" feature are affected\n- this vulnerability was introduced in v0.38.0\n\n## User Accounts are Vulnerable to Takeover (Hijacking)\n\nA reset token for any user can be obtained given knowledge of their username or email via the forgot-password API. With the leaked reset token, a malicious user could request to reset a user's password, changing their credentials and gaining access to their account.\n\n## How to Determine if Projects have been Attacked\n\nTo determine if a project has been attacked, we recommend checking logs for suspicious activity; namely, the volume of requests to the forgot-password API using emails that don't exist. Another indication is if users inform you that they can't access their accounts.\n\nIf you have question or concerns, reach out via the \"For More Information\" section below.\n\n# Patch Releases Available\n\n**The problem has been patched on the v3 and v2 release lines.** Users should upgrade to **v3.3.1+** or **v2.2.5+** respectively.\n\n## Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nWe recommend upgrading to the Patch Releases above. If upgrading is not possible, there are several workarounds:\n\n### Manually strip out `resetToken` and `resetTokenExpiresAt` in the `forgotPassword.handler()`\n\nUsers on all release lines can have their `forgotPassword.handler()` function strip out the sensitive fields manually before returning\n\n```js\nhandler: (user) => {\n // your code to notify/email user of the link to reset their password...\n\n const = { resetToken, resetTokenExpiresAt, ...rest }\n\n return rest\n}\n```\n\n### Use `yarn patch` to manually apply the fix\n\nUsers on v3 and v2 can use [`yarn patch`] to apply the fix if they're using yarn v3. See the dbAuth \"forgot-password\" Account Takeover Vulnerability high gist for instructions. \n\n### Disable the forgot password flow entirely v3 only\n\nUsers on v3 can disable the forgot password flow entirely.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@redwoodjs/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.38.0"
}, {
"fixed" : "2.2.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@redwoodjs/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/redwoodjs/redwood/security/advisories/GHSA-3qmc-2r76-4rqp"
}, {
"type" : "WEB",
"url" : "https://github.com/redwoodjs/redwood/issues/6343"
}, {
"type" : "WEB",
"url" : "https://github.com/redwoodjs/redwood/pull/6778"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/redwoodjs/redwood"
}, {
"type" : "WEB",
"url" : "https://github.com/redwoodjs/redwood/releases/tag/v2.2.5"
}, {
"type" : "WEB",
"url" : "https://github.com/redwoodjs/redwood/releases/tag/v3.3.1"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-10T15:51:01Z",
"nvd_published_at" : null
}
}