CVE-2017-5630: Pear/pear PEAR Core File Overwrite Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-xxv8-pv43-57x5
CVSS 7.5
CWE-74
Published
Advisory Summary

CVE-2017-5630 is a HIGH (CVSS 7.5) pear core file overwrite vulnerability vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Pear/pear libraries in the Packagist ecosystem. The issue involves pear core file overwrite vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2017-5630 at a Glance

CVE Identifier CVE-2017-5630
GHSA Identifier GHSA-xxv8-pv43-57x5
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Pear/pear
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2017-5630

To remediate this vulnerability, upgrade all affected Pear/pear dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pear/pear fixed: Latest secure release
Upgrade pear/pear to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for pear/pear

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-5630, inspect your project dependencies for Pear/pear:

inspect dependencies for pear/pear

Analyze the terminal output to locate any version of Pear/pear in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Pear/pear, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

PECL in the download utility class in the Installer in PEAR Base System v1.10.1 does not validate file types and filenames after a redirect, which allows remote HTTP servers to overwrite files via crafted responses, as demonstrated by a .htaccess overwrite.

CVE-2017-5630 Affected Pear/pear Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pear/pear
Packagist
≤ 1.10.1

References

Frequently Asked Questions

What is CVE-2017-5630?
CVE-2017-5630 is a security vulnerability in Pear/pear involving PEAR core file overwrite vulnerability under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Pear/pear versions are affected?
Affected versions include releases prior to current release patches across affected packages: pear/pear.
What version fixes CVE-2017-5630?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pear/pear affected?
Yes, pear/pear is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2017-5630?
CVE-2017-5630 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2017-5630?
CVE-2017-5630 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Packagist dependencies for CVE-2017-5630?
Run the dependency tree command: 'inspect dependencies for pear/pear'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xxv8-pv43-57x5",
  "modified" : "2023-07-07T20:58:05Z",
  "published" : "2022-05-13T01:28:45Z",
  "aliases" : [ "CVE-2017-5630" ],
  "summary" : "PEAR core file overwrite vulnerability",
  "details" : "PECL in the download utility class in the Installer in PEAR Base System v1.10.1 does not validate file types and filenames after a redirect, which allows remote HTTP servers to overwrite files via crafted responses, as demonstrated by a .htaccess overwrite.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pear/pear"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.10.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-5630"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pear/pear-core"
  }, {
    "type" : "WEB",
    "url" : "https://vimeo.com/201341280"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20210123222048/https://www.securityfocus.com/bid/95882"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/41185"
  }, {
    "type" : "WEB",
    "url" : "http://hyp3rlinx.altervista.org/advisories/PEAR-ARBITRARY-FILE-DOWNLOAD.txt"
  }, {
    "type" : "WEB",
    "url" : "http://pear.php.net/bugs/bug.php?id=21171"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-07T20:58:05Z",
    "nvd_published_at" : "2017-02-01T23:59:00Z"
  }
}