Description
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 sanitization and rendered with insufficient encoding in the web console, leading to arbitrary JavaScript execution in the browsers of authenticated users viewing the statistics dashboard.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| OCS Inventory | OCS Inventory NG Server | ≤ 2.12.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | ocsinventory-server | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 25.10 | ocsinventory-server | No fix yet | — |
| Ubuntu 24.04 LTS | ocsinventory-server | No fix yet | — |
| Ubuntu 22.04 LTS | ocsinventory-server | No fix yet | — |
| Ubuntu 20.04 LTS | ocsinventory-server | No fix yet | — |
| Ubuntu 18.04 LTS | ocsinventory-server | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | ocsinventory-server | No fix yet | — |
References
- https://github.com/OCSInventory-NG/OCSInventory-Server/pull/483 issue-tracking patch
- https://github.com/OCSInventory-NG/OCSInventory-Server/commit/78faf2ca8b897141ba4d337d75692ab8e405bd4e patch
- https://www.vulncheck.com/advisories/ocs-inventory-ng-server-stored-xss-via-user-agent third-party-advisory