CVE-2022-29622: Formidable Formidable Arbitrary File Upload Vulnerability

CRITICAL
Advisory Identifier: GHSA-8cp3-66vr-3r4c
CVSS 9.8
CWE-434
Published
Advisory Summary

CVE-2022-29622 is a CRITICAL (CVSS 9.8) formidable arbitrary file upload vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Formidable libraries in the npm ecosystem. The issue involves formidable arbitrary file upload. Remediation is available by upgrading affected packages to version 3.2.4.

CVE-2022-29622 at a Glance

CVE Identifier CVE-2022-29622
GHSA Identifier GHSA-8cp3-66vr-3r4c
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Formidable
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-29622

To remediate this vulnerability, upgrade all affected Formidable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

formidable fixed: 3.2.4
npm install formidable@3.2.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls formidable

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2022-29622, inspect your project dependencies using npm:

npm ls formidable

Analyze the terminal output to locate any version of Formidable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.4), your application is affected.

Note: The npm ls formidable 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 CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Formidable, 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

Withdrawn: This advisory was improperly assigned. An arbitrary file upload vulnerability in formidable v3.2.4 allows attackers to execute arbitrary code via a crafted filename.

CVE-2022-29622 Affected Formidable Versions

1 component(s)
Fixed Versions:
3.2.4
Product / Package Ecosystem Affected Versions Fixed Version
formidable
npm
< 3.2.4
3.2.4

References

Frequently Asked Questions

What is CVE-2022-29622?
CVE-2022-29622 is a security vulnerability in Formidable involving Formidable arbitrary file upload under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Formidable versions are affected?
Affected versions include releases prior to 3.2.4 across affected packages: formidable.
What version fixes CVE-2022-29622?
Upgrading to 3.2.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is formidable affected?
Yes, formidable is affected in releases prior to 3.2.4. Upgrade your dependency to 3.2.4 or later.
What is the CVSS score of CVE-2022-29622?
CVE-2022-29622 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-29622?
CVE-2022-29622 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2022-29622?
Run the dependency tree command: 'npm ls formidable'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8cp3-66vr-3r4c",
  "modified" : "2024-05-01T13:11:37Z",
  "published" : "2022-05-17T00:01:45Z",
  "withdrawn" : "2024-04-25T16:59:44Z",
  "aliases" : [ "CVE-2022-29622" ],
  "summary" : "Formidable arbitrary file upload",
  "details" : "Withdrawn: This advisory was improperly assigned.\n\nAn arbitrary file upload vulnerability in formidable v3.2.4 allows attackers to execute arbitrary code via a crafted filename.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "formidable"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29622"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-formidable/formidable/issues/856"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-formidable/formidable/issues/862"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/issues/20189"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-formidable/formidable/pull/857"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/node-formidable/formidable"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.com/keymandll/blog/-/blob/master/posts/03062022-Invulnerability_Analysis-CVE-2022%E2%80%9329622/index.md"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/%40zsolt.imre/is-cybersecurity-the-next-supply-chain-vulnerability-9a00de745022"
  }, {
    "type" : "WEB",
    "url" : "https://portswigger.net/daily-swig/researcher-defends-formidable-in-fight-against-critical-cve-vulnerability-assignment"
  }, {
    "type" : "WEB",
    "url" : "https://www.youtube.com/watch?v=C6QPKooxhAo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T23:07:47Z",
    "nvd_published_at" : "2022-05-16T14:15:00Z"
  }
}