{"answers":{"affected":"4 open source packages ship an affected version, including @redwoodjs/api.","exploited":"There is no known exploitation of GHSA-3qmc-2r76-4rqp in the wild and no public exploit code.","fix":"Upgrade @redwoodjs/api to a fixed version for your release line: 2.2.5 or 3.3.1.","what":"GHSA-3qmc-2r76-4rqp is an authentication bypass vulnerability in @redwoodjs/api, published on 10 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-3qmc-2r76-4rqp and fix it if it is affected.\n\nWhat it is: GHSA-3qmc-2r76-4rqp is an authentication bypass vulnerability in @redwoodjs/api, published on 10 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-3qmc-2r76-4rqp in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @redwoodjs/api (npm): affected from 0.38.0; fixed in 2.2.5\n- @redwoodjs/api (npm): affected from 0.38.0; fixed in 2.2.5\n- @redwoodjs/api (npm): affected from 3.0.0; fixed in 3.3.1\n- @redwoodjs/api (npm): affected from 3.0.0; fixed in 3.3.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-3qmc-2r76-4rqp/ (Markdown: https://insights.sbomify.com/GHSA-3qmc-2r76-4rqp/index.md)","id":"GHSA-3qmc-2r76-4rqp","markdown":"https://insights.sbomify.com/GHSA-3qmc-2r76-4rqp/index.md","name":"GHSA-3qmc-2r76-4rqp","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"Redwood dbAuth","requires_auth":"none","summary":"Attackers can hijack user accounts by obtaining reset tokens via the forgot-password API, affecting Redwood projects with this feature enabled.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"# 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) =\u003e {\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.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Redwood is vulnerable to account takeover via dbAuth \"forgot-password\"","id":"GHSA-3qmc-2r76-4rqp","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2.2.5"],"introduced":["0.38.0"],"last_affected":[],"package":"@redwoodjs/api","purl":null,"source":"GHSA-3qmc-2r76-4rqp"},{"ecosystem":"npm","fixed":["2.2.5"],"introduced":["0.38.0"],"last_affected":[],"package":"@redwoodjs/api","purl":"pkg:npm/%40redwoodjs/api","source":"GHSA-3qmc-2r76-4rqp"},{"ecosystem":"npm","fixed":["3.3.1"],"introduced":["3.0.0"],"last_affected":[],"package":"@redwoodjs/api","purl":null,"source":"GHSA-3qmc-2r76-4rqp"},{"ecosystem":"npm","fixed":["3.3.1"],"introduced":["3.0.0"],"last_affected":[],"package":"@redwoodjs/api","purl":"pkg:npm/%40redwoodjs/api","source":"GHSA-3qmc-2r76-4rqp"}],"products":null,"published":"2022-11-10","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can hijack user accounts by obtaining reset tokens via the forgot-password API, affecting Redwood projects with this feature enabled.","url":"https://insights.sbomify.com/GHSA-3qmc-2r76-4rqp/"}