CVE-2023-39015
Description
webmagic-extension v0.9.0 and below was discovered to contain a code injection vulnerability via the component us.codecraft.webmagic.downloader.PhantomJSDownloader.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Code injection in webmagic-extension's PhantomJSDownloader allows arbitrary command execution via unchecked constructor argument.
Vulnerability
Summary
CVE-2023-39015 describes a code injection vulnerability in the webmagic-extension component of the WebMagic web crawler framework, affecting version 0.9.0 and below. The vulnerable class is us.codecraft.webmagic.downloader.PhantomJSDownloader, which accepts a phantomJsCommand string in its constructor without proper validation. This allows an attacker to inject arbitrary commands by passing a crafted string, such as "cmd /c ..." on Windows, directly to the underlying system execution context [3].
Exploitation
The root cause is the lack of input sanitization on the phantomJsCommand parameter. The download method ultimately executes this command, without restricting it to the legitimate PhantomJS binary. Exploitation requires control over the constructor argument, which may be achieved through deserialization, untrusted configuration sources, or other injection points. No authentication is needed if an attacker can supply a crafted PhantomJSDownloader instance – for example, via a malicious request object [3].
Impact
Successful exploitation allows an attacker to execute arbitrary operating system commands with the privileges of the application. This can lead to full system compromise, data exfiltration, or lateral movement within the network. The provided proof-of-concept demonstrates opening multiple calculator windows on Windows, but the same technique can be used for any command [3].
Mitigation
The official suggestion is to remove PhantomJSDownloader.java entirely, as PhantomJS has been unmaintained since 2018. If removal is not feasible, the phantomJsCommand parameter must be strictly validated to ensure it points only to a known PhantomJS executable. No official patch has been released as of the CVE publication date [3].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
us.codecraft:webmagic-coreMaven | <= 0.9.0 | — |
Affected products
3- webmagic-extension/webmagic-extensiondescription
- Range: <=0.9.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-grvq-vjqr-x8vmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-39015ghsaADVISORY
- github.com/code4craft/webmagic/issues/1122ghsaWEB
News mentions
0No linked articles in our index yet.