CVE-2024-40400: Automad/automad Automad Arbitrary File Upload Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-47mc-qmh2-mqj4
CVSS 6.8
CWE-434
Published
Advisory Summary

CVE-2024-40400 is a HIGH (CVSS 6.8) automad arbitrary file upload vulnerability vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Automad/automad libraries in the Packagist ecosystem. The issue involves automad arbitrary file upload vulnerability. Remediation is available by upgrading affected packages to version 2.0.0-alpha.5.

CVE-2024-40400 at a Glance

CVE Identifier CVE-2024-40400
GHSA Identifier GHSA-47mc-qmh2-mqj4
Severity HIGH
CVSS v3.1 Base Score 6.8
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Automad/automad
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2024-40400

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

automad/automad fixed: 2.0.0-alpha.5
Upgrade automad/automad to 2.0.0-alpha.5
Verify Direct and Transitive Dependencies

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

inspect dependencies for automad/automad

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-40400, inspect your project dependencies for Automad/automad:

inspect dependencies for automad/automad

Analyze the terminal output to locate any version of Automad/automad in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0-alpha.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

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 Automad/automad, 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

An arbitrary file upload vulnerability in the image upload function of Automad v2.0.0 allows attackers to execute arbitrary code via a crafted file. The malicious file has to be prepared and uploaded manually by the admin. Usually there is only one admin per site and that is the owner.

CVE-2024-40400 Affected Automad/automad Versions

1 component(s)
Fixed Versions:
2.0.0-alpha.5
Product / Package Ecosystem Affected Versions Fixed Version
automad/automad
Packagist
< 2.0.0-alpha.5
2.0.0-alpha.5

References

Frequently Asked Questions

What is CVE-2024-40400?
CVE-2024-40400 is a security vulnerability in Automad/automad involving Automad arbitrary file upload vulnerability under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Automad/automad versions are affected?
Affected versions include releases prior to 2.0.0-alpha.5 across affected packages: automad/automad.
What version fixes CVE-2024-40400?
Upgrading to 2.0.0-alpha.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is automad/automad affected?
Yes, automad/automad is affected in releases prior to 2.0.0-alpha.5. Upgrade your dependency to 2.0.0-alpha.5 or later.
What is the CVSS score of CVE-2024-40400?
CVE-2024-40400 has a CVSS v3.1 base score of 6.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-40400?
CVE-2024-40400 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 Packagist dependencies for CVE-2024-40400?
Run the dependency tree command: 'inspect dependencies for automad/automad'. 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-47mc-qmh2-mqj4",
  "modified" : "2024-11-18T16:26:54Z",
  "published" : "2024-07-19T21:31:11Z",
  "aliases" : [ "CVE-2024-40400" ],
  "summary" : "Automad arbitrary file upload vulnerability",
  "details" : "An arbitrary file upload vulnerability in the image upload function of Automad v2.0.0 allows attackers to execute arbitrary code via a crafted file.\n\nThe malicious file has to be prepared and uploaded manually by the admin. Usually there is only one admin per site and that is the owner.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "automad/automad"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.0-alpha.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40400"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/marcantondahmen/automad/issues/106"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/marcantondahmen/automad/commit/112f070ccf423931c9bb2b36f9a26c345e1ef56e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/marcantondahmen/automad"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-19T22:39:49Z",
    "nvd_published_at" : "2024-07-19T19:15:09Z"
  }
}