CVE-2015-5243: Jsmitty12/phpwhois PhpWhois Arbitrary Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-c95f-27gx-6vq9
CVSS 9.8
CWE-94
Published
Advisory Summary

CVE-2015-5243 is a CRITICAL (CVSS 9.8) phpwhois arbitrary code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Jsmitty12/phpwhois libraries in the Packagist ecosystem. The issue involves phpwhois arbitrary code execution via a crafted whois record. Remediation is available by upgrading affected packages to version 5.1.0.

CVE-2015-5243 at a Glance

CVE Identifier CVE-2015-5243
GHSA Identifier GHSA-c95f-27gx-6vq9
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Jsmitty12/phpwhois
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2015-5243

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

jsmitty12/phpwhois fixed: 5.1.0
Upgrade jsmitty12/phpwhois to 5.1.0
phpwhois/phpwhois fixed: Latest secure release
Upgrade phpwhois/phpwhois to Latest secure release
brightlocal/phpwhois fixed: Latest secure release
Upgrade brightlocal/phpwhois to Latest secure release
david-garcia/phpwhois fixed: Latest secure release
Upgrade david-garcia/phpwhois to Latest secure release
ivankristianto/phpwhois fixed: Latest secure release
Upgrade ivankristianto/phpwhois to Latest secure release
kazist/phpwhois fixed: Latest secure release
Upgrade kazist/phpwhois to Latest secure release
serluck/phpwhois fixed: Latest secure release
Upgrade serluck/phpwhois to Latest secure release
simple-updates/phpwhois fixed: Latest secure release
Upgrade simple-updates/phpwhois to Latest secure release
truckersmp/phpwhois fixed: Latest secure release
Upgrade truckersmp/phpwhois 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 jsmitty12/phpwhois

How to Check if You Are Affected

To determine whether your application is affected by CVE-2015-5243, inspect your project dependencies for Jsmitty12/phpwhois:

inspect dependencies for jsmitty12/phpwhois

Analyze the terminal output to locate any version of Jsmitty12/phpwhois in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.1.0), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Jsmitty12/phpwhois, 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

phpWhois allows remote attackers to execute arbitrary code via a crafted whois record.

CVE-2015-5243 Affected Jsmitty12/phpwhois Versions

9 component(s)
Fixed Versions:
5.1.0
Product / Package Ecosystem Affected Versions Fixed Version
jsmitty12/phpwhois
Packagist
< 5.1.0
5.1.0
phpwhois/phpwhois
Packagist
≤ 4.2.5
brightlocal/phpwhois
Packagist
≤ 4.2.5
david-garcia/phpwhois
Packagist
≤ 4.3.1
ivankristianto/phpwhois
Packagist
≤ 4.3.0
kazist/phpwhois
Packagist
≤ 4.2.6
serluck/phpwhois
Packagist
≤ 4.2.6
simple-updates/phpwhois
Packagist
≤ 1.0.0
truckersmp/phpwhois
Packagist
≤ 4.3.1

References

NVD — CVE-2015-5243 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-5243
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/jsmitty12/phpWhois/issues/19
Security Fix Commit FIX COMMIT
https://github.com/Gemorroj/phpwhois/commit/91c937e03c876ba1290b6de2a3ad953d2105fdd0
Security Fix Commit FIX COMMIT
https://github.com/sparc/phpWhois.org/commit/5cc572490c9053d46598ec9348a11e36a5a33a46#diff-f150ae17da7341bf6c2eff928684b3a3
blog.nettitude.com/uk/cve-2015-5243-ph... WEB
https://blog.nettitude.com/uk/cve-2015-5243-phpwhois-remote-code-execution
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/brightlocal/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/david-garcia/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/ivankristianto/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/kazist/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/phpwhois/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/serluck/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/simple-updates/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/truckersmp/phpwhois/CVE-2015-5243.yaml
Jsmitty12/phpwhois Source Repository REPOSITORY
https://github.com/jsmitty12/phpWhois/blob/master/CHANGELOG.md
GitHub Advisory / Wiki ADVISORY
https://github.com/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180425-01_phpWhois_Code_Execution

Frequently Asked Questions

What is CVE-2015-5243?
CVE-2015-5243 is a security vulnerability in Jsmitty12/phpwhois involving phpWhois arbitrary code execution via a crafted whois record under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Jsmitty12/phpwhois versions are affected?
Affected versions include releases prior to 5.1.0 across affected packages: jsmitty12/phpwhois, phpwhois/phpwhois, brightlocal/phpwhois, david-garcia/phpwhois, ivankristianto/phpwhois, kazist/phpwhois, serluck/phpwhois, simple-updates/phpwhois, truckersmp/phpwhois.
What version fixes CVE-2015-5243?
Upgrading to 5.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jsmitty12/phpwhois affected?
Yes, jsmitty12/phpwhois is affected in releases prior to 5.1.0. Upgrade your dependency to 5.1.0 or later.
Is phpwhois/phpwhois affected?
Yes, phpwhois/phpwhois 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-2015-5243?
CVE-2015-5243 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2015-5243?
CVE-2015-5243 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2015-5243?
Run the dependency tree command: 'inspect dependencies for jsmitty12/phpwhois'. 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-c95f-27gx-6vq9",
  "modified" : "2024-04-23T22:40:23Z",
  "published" : "2022-05-14T00:57:40Z",
  "aliases" : [ "CVE-2015-5243" ],
  "summary" : "phpWhois arbitrary code execution via a crafted whois record",
  "details" : "phpWhois allows remote attackers to execute arbitrary code via a crafted whois record.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "jsmitty12/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpwhois/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.2.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "brightlocal/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.2.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "david-garcia/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ivankristianto/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "kazist/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.2.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "serluck/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.2.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simple-updates/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "truckersmp/phpwhois"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-5243"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jsmitty12/phpWhois/issues/19"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Gemorroj/phpwhois/commit/91c937e03c876ba1290b6de2a3ad953d2105fdd0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sparc/phpWhois.org/commit/5cc572490c9053d46598ec9348a11e36a5a33a46#diff-f150ae17da7341bf6c2eff928684b3a3"
  }, {
    "type" : "WEB",
    "url" : "https://blog.nettitude.com/uk/cve-2015-5243-phpwhois-remote-code-execution"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/brightlocal/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/david-garcia/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/ivankristianto/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/kazist/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/phpwhois/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/serluck/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simple-updates/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/truckersmp/phpwhois/CVE-2015-5243.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jsmitty12/phpWhois/blob/master/CHANGELOG.md"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180425-01_phpWhois_Code_Execution"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-23T22:40:23Z",
    "nvd_published_at" : "2018-08-20T21:29:00Z"
  }
}