CVE-2015-5243: phpWhois Arbitrary Code Execution

jsmitty12/phpwhois Updated 02 Oct 2025

Summary

14/05/2022
Yes i
Critical
9.8

CVE-2015-5243: phpWhois arbitrary code execution via a crafted whois record. Affects jsmitty12/phpwhois versions < 5.1.0. Fixed in 5.1.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

phpWhois is an open-source library used for performing WHOIS queries on domain names. It provides functionality to retrieve domain registration information from WHOIS servers. The library is commonly used in PHP applications to gather information about domain names, such as ownership, registration dates, and contact details. However, a critical vulnerability has been discovered in phpWhois that allows remote attackers to execute arbitrary code by exploiting a crafted WHOIS record.

Vulnerability Detail

The vulnerability in phpWhois arises from a lack of proper input validation when processing WHOIS records. An attacker can send a specially crafted WHOIS record that contains malicious code. When this record is processed by phpWhois, the code is executed within the application's context, leading to arbitrary code execution. This can result in various consequences, including unauthorized access, data theft, or even complete compromise of the affected system.

How To Fix

Minimum fixed version

5.1.0

This is the first release that contains the fix.

composer require jsmitty12/phpwhois:5.1.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the phpWhois library is not immediately feasible, a temporary workaround can be implemented by implementing strict input validation when processing WHOIS records. This can be done by thoroughly validating and sanitizing the input data to ensure that it does not contain any malicious code. Additionally, it is recommended to restrict access to the phpWhois functionality to trusted sources only.

Conclusion

The phpWhois library is vulnerable to arbitrary code execution due to a lack of input validation. To mitigate this vulnerability, it is essential to update the library to version 5.1.0 or later. If immediate update is not possible, strict input validation and access restriction can serve as temporary workarounds. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jsmitty12/phpwhois →

Share this vulnerability

FAQ

phpWhois is an open-source library used for performing WHOIS queries on domain names. It provides functionality to retrieve domain registration information from WHOIS servers.

The vulnerability allows remote attackers to execute arbitrary code within the context of the affected application. This can lead to unauthorized access, data theft, or complete compromise of the system.

To fix this vulnerability, update the phpWhois library to version 5.1.0 or later. This version includes a patch that addresses the input validation issue.

If updating the library is not immediately feasible, implement strict input validation when processing WHOIS records and restrict access to the phpWhois functionality to trusted sources.

There are no known public exploits available for this vulnerability at the moment. However, it is crucial to apply the recommended fixes to prevent any potential exploitation.

How To Fix

Minimum fixed version

5.1.0

This is the first release that contains the fix.

composer require jsmitty12/phpwhois:5.1.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.