ghsa-6955-67hm-vjjq
Vulnerability from github
Drupal core sanitizes filenames with dangerous extensions upon upload and strips leading and trailing dots from filenames to prevent uploading server configuration files.
However, the protections for these two vulnerabilities previously did not work correctly together. As a result, if the site were configured to allow the upload of files with an htaccess extension, these files' filenames would not be properly sanitized. This could allow bypassing the protections provided by Drupal core's default .htaccess files and possible remote code execution on Apache web servers.
This issue is mitigated by the fact that it requires a field administrator to explicitly configure a file field to allow htaccess as an extension (a restricted permission), or a contributed module or custom code that overrides allowed file uploads.
{ "affected": [ { "package": { "ecosystem": "Packagist", "name": "drupal/core" }, "ranges": [ { "events": [ { "introduced": "8.0.0" }, { "fixed": "9.3.19" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Packagist", "name": "drupal/core" }, "ranges": [ { "events": [ { "introduced": "9.4.0" }, { "fixed": "9.4.3" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-25277" ], "database_specific": { "cwe_ids": [ "CWE-434" ], "github_reviewed": true, "github_reviewed_at": "2022-08-06T09:33:38Z", "nvd_published_at": "2023-04-26T15:15:08Z", "severity": "HIGH" }, "details": "Drupal core sanitizes filenames with dangerous extensions upon upload and strips leading and trailing dots from filenames to prevent uploading server configuration files.\n\nHowever, the protections for these two vulnerabilities previously did not work correctly together. As a result, if the site were configured to allow the upload of files with an htaccess extension, these files\u0027 filenames would not be properly sanitized. This could allow bypassing the protections provided by Drupal core\u0027s default .htaccess files and possible remote code execution on Apache web servers.\n\nThis issue is mitigated by the fact that it requires a field administrator to explicitly configure a file field to allow htaccess as an extension (a restricted permission), or a contributed module or custom code that overrides allowed file uploads.", "id": "GHSA-6955-67hm-vjjq", "modified": "2023-05-10T00:36:31Z", "published": "2022-08-06T09:33:38Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-25277" }, { "type": "WEB", "url": "https://github.com/drupal/core/commit/1cd1830d79f221cc8490f53c2bb487dd07094f17" }, { "type": "WEB", "url": "https://github.com/drupal/core/commit/5d464ea4407c50e40dcf6cb5ee376e7b8dd36f3a" }, { "type": "WEB", "url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2022-25277.yaml" }, { "type": "PACKAGE", "url": "https://github.com/drupal/core" }, { "type": "WEB", "url": "https://www.drupal.org/sa-core-2022-014" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "type": "CVSS_V3" } ], "summary": "Drupal core arbitrary PHP code execution" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.