CVE-2021-43617: Withdrawn Laravel Framework Does Not Sufficiently Vulnerability

MODERATE
Advisory Identifier: GHSA-364w-9g92-3grq
CWE-434
Published
Advisory Summary

CVE-2021-43617 is a MODERATE laravel framework does not sufficiently vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Withdrawn libraries in the Packagist ecosystem. The issue involves laravel framework does not sufficiently block the upload of executable php content.. Remediation is available in the latest vendor maintenance releases.

CVE-2021-43617 at a Glance

CVE Identifier CVE-2021-43617
GHSA Identifier GHSA-364w-9g92-3grq
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Withdrawn
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2021-43617

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

laravel/framework fixed: Latest secure release
Upgrade laravel/framework to Latest secure release
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 laravel/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-43617, inspect your project dependencies for Withdrawn:

inspect dependencies for laravel/framework

Analyze the terminal output to locate any version of Withdrawn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 Withdrawn, 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 has been withdrawn after the maintainers of Laravel noted this issue is not a security vulnerability with Laravel itself, but rather a userland issue. ## Original CVE based description Laravel Framework through 8.70.2 does not sufficiently block the upload of executable PHP content because Illuminate/Validation/Concerns/ValidatesAttributes.php lacks a check for .phar files, which are handled as application/x-httpd-php on systems based on Debian. In some use cases, this may be related to file-type validation for image upload (e.g., differences between getClientOriginalExtension and other approaches).

CVE-2021-43617 Affected Withdrawn Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
laravel/framework
Packagist
≤ 8.70.2

References

Frequently Asked Questions

What is CVE-2021-43617?
CVE-2021-43617 is a security vulnerability in Withdrawn involving Laravel Framework does not sufficiently block the upload of executable PHP content. under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Withdrawn versions are affected?
Affected versions include releases prior to current release patches across affected packages: laravel/framework.
What version fixes CVE-2021-43617?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/framework affected?
Yes, laravel/framework is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2021-43617?
CVE-2021-43617 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-2021-43617?
Run the dependency tree command: 'inspect dependencies for laravel/framework'. 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-364w-9g92-3grq",
  "modified" : "2021-11-17T22:04:33Z",
  "published" : "2021-11-16T23:40:08Z",
  "withdrawn" : "2021-11-17T15:41:54Z",
  "aliases" : [ "CVE-2021-43617" ],
  "summary" : "Withdrawn: Laravel Framework does not sufficiently block the upload of executable PHP content.",
  "details" : "# Withdrawn\n\nThis advisory has been withdrawn after the maintainers of Laravel noted this issue is not a security vulnerability with Laravel itself, but rather a userland issue.\n\n## Original CVE based description\n\nLaravel Framework through 8.70.2 does not sufficiently block the upload of executable PHP content because Illuminate/Validation/Concerns/ValidatesAttributes.php lacks a check for .phar files, which are handled as application/x-httpd-php on systems based on Debian. In some use cases, this may be related to file-type validation for image upload (e.g., differences between getClientOriginalExtension and other approaches).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "8.70.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43617"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/framework"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/blob/2049de73aa099a113a287587df4cc522c90961f5/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1130-L1132"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/blob/2049de73aa099a113a287587df4cc522c90961f5/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1331-L1333"
  }, {
    "type" : "WEB",
    "url" : "https://hosein-vita.medium.com/laravel-8-x-image-upload-bypass-zero-day-852bd806019b"
  }, {
    "type" : "WEB",
    "url" : "https://salsa.debian.org/php-team/php/-/blob/dc253886b5b2e9bc8d9e36db787abb083a667fd8/debian/php-cgi.conf#L5-6"
  }, {
    "type" : "WEB",
    "url" : "https://salsa.debian.org/php-team/php/-/commit/dc253886b5b2e9bc8d9e36db787abb083a667fd8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-15T22:20:46Z",
    "nvd_published_at" : "2021-11-14T16:15:00Z"
  }
}