GHSA-fg79-cr9c-7369 — openmage/magento-lts
HIGHGHSA-fg79-cr9c-7369 is a high-severity (CVSS 8.1) Deserialization of Untrusted Data vulnerability in openmage/magento-lts. A fix is available for openmage/magento-lts — see the affected versions and patch details below.
OpenMage LTS: Phar Deserialization leads to Remote Code Execution
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fg79-cr9c-7369.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-fg79-cr9c-7369 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
openmage/magento-ltsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
PHP functions such as getimagesize(), file_exists(), and is_readable() can trigger deserialization when processing phar:// stream wrapper paths. OpenMage LTS uses these functions with potentially controllable file paths during image validation and media handling. An attacker who can upload a malicious phar file (disguised as an image) and trigger one of these functions with a phar:// path can achieve arbitrary code execution.
| Metric | Value | Justification |
|---|---|---|
| Attack Vector (AV) | Network | Exploitable via file upload and web requests |
| Attack Complexity (AC) | High | Requires file upload + triggering phar:// access |
| Privileges Required (PR) | None | Some upload vectors don't require authentication |
| User Interaction (UI) | None | Exploitation is automatic once triggered |
| Scope (S) | Unchanged | Impacts the vulnerable component |
| Confidentiality (C) | High | Full system access via RCE |
| Integrity (I) | High | Arbitrary code execution |
| Availability (A) | High | Complete system compromise possible |
Affected Products
- OpenMage LTS versions < 20.16.1
- All versions derived from Magento 1.x with these code paths
Affected Files
| File | Line | Vulnerable Function |
|---|---|---|
app/code/core/Mage/Core/Model/File/Validator/Image.php | 72 | getimagesize($filePath) |
app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php | 137 | getimagesize($item->getFilename()) |
lib/Varien/Image.php | 71 | $this->_getAdapter()->open($this->_fileName) |
Vulnerability Details
PHP's phar (PHP Archive) format stores metadata that is serialized. When PHP's stream wrapper functions access a file using the phar:// protocol, the metadata is automatically deserialized. This occurs even with seemingly safe functions like file_exists() or getimagesize().
A polyglot file can be crafted that is both a valid image (passing initial validation) and a valid phar archive containing malicious serialized objects. When the application later processes this file using phar://, the deserialization triggers a gadget chain leading to RCE.
Attack Flow
- Create polyglot file: Attacker creates a file that is both valid JPEG and valid PHAR
- Upload file: Attacker uploads the polyglot via product images, CMS media, or import
- Trigger phar:// access: Attacker causes the application to access the file using
phar://wrapper - Code execution: PHAR metadata deserialization triggers gadget chain
Proof of Concept
<?php
// Create malicious phar file
class ExploitGadget {
public $cmd = 'id > /tmp/pwned';
function __destruct() {
system($this->cmd);
}
}
$phar = new Phar('exploit.phar');
$phar->startBuffering();
$phar->addFromString('test.txt', 'test');
$phar->setStub('<?php __HALT_COMPILER(); ?>');
$phar->setMetadata(new ExploitGadget());
$phar->stopBuffering();
// Rename to appear as image
rename('exploit.phar', 'exploit.jpg');
// When getimagesize('phar://path/to/exploit.jpg') is called,
// the ExploitGadget::__destruct() method executes
Remediation
Block phar:// paths before passing to vulnerable functions:
// Before (vulnerable)
[$imageWidth, $imageHeight, $fileType] = getimagesize($filePath);
// After (fixed)
if (str_starts_with($filePath, 'phar://')) {
throw new Exception('Invalid image path.');
}
[$imageWidth, $imageHeight, $fileType] = getimagesize($filePath);
Additionally, ICO files (which cannot be re-encoded by GD) are now scanned for phar signatures:
__HALT_COMPILER();- Required phar stub<?php- PHP opening tag<?=- PHP short echo tag
Additional hardening measures:
-
ICO uploads removed: ICO file support is completely removed from new image uploads. This eliminates the polyglot attack vector entirely since all other image formats are re-encoded by GD, which strips any embedded phar metadata.
-
Phar wrapper disabled: The
phar://stream wrapper is unregistered at application bootstrap, preventing any phar deserialization attacks regardless of code path. -
Cache deserialization hardening: All
unserialize()calls on cached data now useallowed_classes => falseas defense-in-depth.
Note: Existing uploaded ICO files will continue to work. Only new ICO uploads will be rejected. Users are encouraged to use PNG favicons for new uploads.
Workarounds
If immediate upgrade is not possible:
-
Disable phar stream wrapper (if not needed):
; php.ini disable_functions = phar://Or in code:
stream_wrapper_unregister('phar'); -
Strict upload validation: Implement additional validation beyond file extension
-
File storage isolation: Store uploads outside web root with randomized names
-
Web Application Firewall: Block requests containing
phar://in parameters
Credit
This vulnerability was discovered and responsibly disclosed by blackhat2013 through HackerOne.
Timeline
- 2025-12-31: Vulnerability reported via HackerOne
- 2026-01-21: Fix developed and tested
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | openmage/magento-lts | all versions | 20.17.0composer require openmage/magento-lts:^20.17.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for openmage/magento-lts, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update openmage/magento-lts to 20.17.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fg79-cr9c-7369 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-fg79-cr9c-7369 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-fg79-cr9c-7369. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-fg79-cr9c-7369 in your dependencies?
O3 Security finds GHSA-fg79-cr9c-7369 across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.