承接 aquivemedia/module-disable-customer-file-upload 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aquivemedia/module-disable-customer-file-upload

最新稳定版本:1.0.2

Composer 安装命令:

composer require aquivemedia/module-disable-customer-file-upload

包简介

N/A

README 文档

README

A Magento 2 security module that disables the unauthenticated customer address file upload endpoint to protect against CVE-2025-54236 (SessionReaper) and related file upload vulnerabilities.

Security Context

CVE-2025-54236 (SessionReaper)

In October 2025, a critical vulnerability dubbed "SessionReaper" was discovered in Magento 2 / Adobe Commerce. This vulnerability combines two attack vectors:

  1. Nested Deserialization Vulnerability - Allows attackers to control PHP session storage paths via API deserialization chains
  2. Unauthenticated File Upload - Permits arbitrary file uploads through the customer address endpoint

When combined, these vulnerabilities enable remote code execution on vulnerable Magento installations, particularly those using file-based session storage.

The File Upload Component

Even on patched systems where the deserialization vulnerability has been fixed, the file upload endpoint remains a significant security risk:

Endpoint: /customer/address_file/upload

Vulnerabilities:

  • No authentication required
  • Minimal form key validation (any matching cookie/form value works)
  • Allows upload of files without extensions
  • Files stored in predictable locations: pub/media/customer_address/[first_char]/[second_char]/filename
  • Can be exploited for storage abuse, XSS, and social engineering attacks
  • May be chained with future vulnerabilities

What This Module Does

This module completely disables the vulnerable file upload endpoint by intercepting all requests and returning a 403 Forbidden response with a JSON error message.

Implementation:

  • Uses an around plugin on Magento\Customer\Controller\Address\File\Upload::execute()
  • Short-circuits the controller before any file processing occurs
  • Returns a clear error message to legitimate users who might encounter it

Installation

composer require aquivemedia/module-disable-customer-file-upload
bin/magento module:enable AquiveMedia_DisableCustomerFileUpload
bin/magento setup:upgrade
bin/magento cache:flush

When to Use This Module

Install this module if:

  • You don't use custom file upload attributes on customer addresses
  • You want defense-in-depth against file upload vulnerabilities
  • You want to reduce your attack surface

You may not need this module if:

  • You actively use customer address file upload functionality (rare)
  • You have custom extensions that depend on this endpoint
  • You have already disabled write permissions on pub/media/customer_address/

Tested on

  • Magento 2.4.6-p13

Compatibility

Should work on

  • Magento: 2.4.x
  • Adobe Commerce: 2.4.x
  • PHP: 7.4+, 8.1+

Security Recommendations

  1. Apply Adobe Security Patches: Always install the latest security patches from Adobe
  2. Run Security Scans: Use tools like Sansec eComscan to check for backdoors
  3. File Monitoring: Monitor pub/media/customer_address/ for suspicious files:
    find pub/media/customer_address -type f \( -name "sess_*" -o -name "*.php" \)

References

Support

For issues or questions:

License

See LICENSE file for details.

Author

  • Jeroen de Reus

统计信息

  • 总下载量: 1.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-10-31