CVE-2021-46440: Strapi insecure password handling in documentation plugin

CVE-2021-46440 · Severity: low · CVSS 3.1 · Published 2022-05-04

Strapi, a popular open-source headless CMS and API development platform, stores authentication credentials in a recoverable format within its documentation plugin. An attacker who intercepts an HTTP request can extract and base64-decode a cookie to obtain cleartext passwords, then leverage those credentials to access API documentation and conduct further attacks on the underlying APIs.

Technologies: @strapi/strapi (npm), strapi (npm). Vendors: npm.

Quick answers

Is CVE-2021-46440 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-46440 being exploited in the wild.
How severe is CVE-2021-46440?
Low severity, with a CVSS score of 3.1, published 4 May 2022.
Which products and versions are affected?
@strapi/strapi (npm) SEMVER:introduced=4.0.0,fixed=4.1.5; strapi (npm) SEMVER:introduced=0,fixed=3.6.9.
Is there a fix for CVE-2021-46440?
Yes. @strapi/strapi (npm): upgrade to 4.1.5 or later; strapi (npm): upgrade to 3.6.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2021-46440 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2021-46440?
Check whether you run @strapi/strapi (npm) or strapi (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @strapi/strapi (npm): upgrade to 4.1.5 or later
    npm install @strapi/strapi@4.1.5
  • strapi (npm): upgrade to 3.6.9 or later
    npm install strapi@3.6.9

Technical details

This vulnerability exists in the DOCUMENTATION plugin component of Strapi, which improperly encodes (rather than properly hashing or encrypting) authentication cookies. The vulnerability affects Strapi versions before 3.6.9 and 4.x before 4.1.5. An attacker with network access to intercept HTTP traffic can capture the authentication cookie, base64-decode it to recover the plaintext password, and use it to authenticate to the API documentation endpoint. No authentication or special privileges are required to perform the interception; the attack vector is passive network observation (CWE-922: Insecure Storage of Sensitive Information). The fix, merged in PR #12246, changes the documentation auth cookie system to use proper cryptographic storage. Patches are available in versions 3.6.9, 4.1.5, and later.

Affected products

  • Strapi Strapi before 3.6.9 and 4.x before 4.1.5

Identifiers

  • CVE-2021-46440
  • GHSA-85vg-grr5-pw42

Timeline

  • 2022-05-04: disclosed: Advisory published on GitHub and OSV
  • 2022-02-08: patched: Fix merged in PR #12246 for releases/v3.6.9

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.