GHSA-7gwj-7fhm-vw4w: Drupal/core Drupal Core Unrestricted File Upload Vulnerability
MODERATEGHSA-7gwj-7fhm-vw4w is a MODERATE (CVSS 6.6) drupal core unrestricted file upload vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Drupal/core libraries in the Packagist ecosystem. The issue involves drupal core unrestricted file upload. Remediation is available by upgrading affected packages to version 8.7.11, 8.8.1.
GHSA-7gwj-7fhm-vw4w at a Glance
Security Impact
CVSS: 6.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N).
How to Fix GHSA-7gwj-7fhm-vw4w
To remediate this vulnerability, upgrade all affected Drupal/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade drupal/core to 8.7.11
Upgrade drupal/core to 8.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for drupal/core
How to Check if You Are Affected
To determine whether your application is affected by GHSA-7gwj-7fhm-vw4w, inspect your project dependencies for Drupal/core:
inspect dependencies for drupal/core
Analyze the terminal output to locate any version of Drupal/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.7.11), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & RFC 5280 Specification
Under RFC 5280 specifications for X.509 certificates, the Name Constraints extension defines a namespace within which all subsequent subject names in a certification path must be located. Constraints apply to various name forms including directory names, IP addresses, rfc822Name (email addresses), and uniformResourceIdentifier (URI) entries. Specifically, during certificate path validation, affected versions of Drupal/core failed to properly normalize or enforce boundary checks when domain names contained trailing dot (.) characters. Because domain names with a trailing dot signify fully qualified domain names (FQDNs), this omission allowed non-conforming certificates to be improperly validated as compliant with the defined name constraints.
Source Advisory Statement
GHSA-7gwj-7fhm-vw4w Affected Drupal/core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
drupal/core
|
Packagist |
≥ 8.0.0
< 8.7.11
|
8.7.11
|
|
drupal/core
|
Packagist |
≥ 8.8.0
< 8.8.1
|
8.8.1
|
References
Frequently Asked Questions
What is GHSA-7gwj-7fhm-vw4w?
Which Drupal/core versions are affected?
What version fixes GHSA-7gwj-7fhm-vw4w?
Is drupal/core affected?
What is the CVSS score of GHSA-7gwj-7fhm-vw4w?
What CWE is associated with GHSA-7gwj-7fhm-vw4w?
How can I check Packagist dependencies for GHSA-7gwj-7fhm-vw4w?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7gwj-7fhm-vw4w",
"modified" : "2024-05-15T20:43:00Z",
"published" : "2024-05-15T20:43:00Z",
"aliases" : [ ],
"summary" : "Drupal core unrestricted file upload",
"details" : "Drupal 8 core's file_save_upload() function does not strip the leading and trailing dot ('.') from filenames, like Drupal 7 did.\n\nUsers with the ability to upload files with any extension in conjunction with contributed modules may be able to use this to upload system files such as .htaccess in order to bypass protections afforded by Drupal's default .htaccess file.\n\nAfter this fix, file_save_upload() now trims leading and trailing dots from filenames.\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.7.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.8.0"
}, {
"fixed" : "8.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/2019-12-18-2.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/drupal/core"
}, {
"type" : "WEB",
"url" : "https://www.drupal.org/sa-core-2019-010"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T20:43:00Z",
"nvd_published_at" : null
}
}