Skip to content
Threat Feed
critical threat PoC

DedeCMS: PHP code injection in ShowMsg() (CVE-2021-48016)

DedeCMS through 5.8.1-beta contains a PHP code injection vulnerability in the ShowMsg() function, allowing unauthenticated attackers to execute arbitrary system commands via a crafted HTTP Referer header.

CVE search metadata

CVE search record: CVE-2021-48016. Severity: critical. CVSS: 9.8. KEV: no. Product: DedeCMS (<= 5.8.1-beta). Brief: DedeCMS: PHP code injection in ShowMsg() (CVE-2021-48016). Brief link: https://feed.craftedsignal.io/briefs/2026-10-dedecms-code-injection/

Triage facts

Revision 2
Applicability
DedeCMS (<= 5.8.1-beta)
Evidence
Unknown
Severity
Critical
Action
Immediate escalation
Sources
2 public sources
Freshness
Revision 2Oct 22, 12:50 UTC
Detection
1 rule
Vulnerabilities
1 CVE
Source quality
A1Very likely
Revision history 1 entry · Revision 2
  1. Revision 2

    poc_available

    Changed: has_poc, lastmod, poc_references, references, updates

    Sources: 1

DedeCMS versions through 5.8.1-beta are vulnerable to PHP code injection within the ShowMsg() function. The vulnerability arises because the application improperly handles the HTTP Referer header, writing it directly into a DedeTemplate string before inclusion. An unauthenticated attacker can exploit this by sending a crafted HTTP request to the '/plus/flink.php?dopost=save' endpoint with an empty validate code field. Successful exploitation results in arbitrary PHP and system command execution. This vulnerability has been subject to in-the-wild exploitation since at least October 14, 2023.

Attack Chain

  1. Attacker identifies a target running DedeCMS 5.8.1-beta or earlier.
  2. Attacker crafts a malicious HTTP request targeting '/plus/flink.php?dopost=save'.
  3. Attacker includes a malicious payload within the 'Referer' header.
  4. Attacker ensures the 'validate' parameter is empty to bypass simple verification.
  5. The server-side ShowMsg() function processes the crafted 'Referer' header.
  6. The application writes the 'Referer' value into a template string and includes it.
  7. Arbitrary PHP code injected in the 'Referer' header is executed by the server.

Impact

Successful exploitation allows unauthenticated remote attackers to execute arbitrary PHP code and system commands on the underlying host, potentially leading to full system compromise.

Recommendation

  • Inventory all internet-facing instances of DedeCMS.
  • Patch affected instances immediately; confirm if the vendor has provided a specific update that remediates the ShowMsg() injection vulnerability.
  • If a patch is unavailable, restrict access to '/plus/flink.php' at the web application firewall or reverse proxy level.
  • Enable detailed web server logging to capture 'Referer' headers and audit requests to the 'flink.php' endpoint for anomalous payloads containing PHP tags or shell commands.

Immediate actions

Scan for DedeCMS installations

SOC 24h

Mitigations

Disable the affected flink.php endpoint or apply WAF filtering

immediate IT Operations

CVE-2021-48016

Detection coverage 1

Detects CVE-2021-48016 Exploitation - PHP Code Injection via Referer Header

critical

Detects attempts to exploit the DedeCMS ShowMsg() vulnerability by checking for common PHP injection patterns within the HTTP Referer header sent to the flink.php endpoint.

sigma tactics: execution, initial_access techniques: T1190 sources: webserver

Detection queries are available on the platform. Get full rules →