title: OSIsoft PI Web API
description: A remote authenticated attacker with write access to a PI Server could trick a user into interacting with a PI Web API endpoint and redirect them to a malicious website. As a result, a victim may disclose sensitive information to the attacker or be provided with false information.
problem types: CWE-79 Cross-site Scripting (XSS)
affected:
{
product: PI Web API
vendor: OSIsoft
versions:
lessThanOrEqual: 2019 SPI, status: affected, version: All versions, versionType: custom
}
metrics:
cvssV3_1: [
attackComplexity: LOW
attackVector: NETWORK
availabilityImpact: NONE
baseScore: 6.9
baseSeverity: MEDIUM
confidentialityImpact: HIGH
integrityImpact: LOW
privilegesRequired: HIGH
scope: CHANGED
userInteraction: REQUIRED
vectorString: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N
version: 3.1
]
workarounds: OSIsoft recommends upgrading to PI Web API 2021. Additional information can be found in the OSIsoft PI Web API security bulletin (registration required).
OSIsoft recommends applying the following workaround in PI Web API to help reduce the risk:
Remove the OSIsoft.REST.Documentation.dll from the PI Web API installation directory.
The PI Web API installation directory is available at this registry entry:
\\HKLM\SOFTWARE\PISystem\WebAPI\InstallationDirectory
The default PI Web API installation directory is:
C:\Program Files\PIPC\WebAPI
Removing this file will cause built-in documentation to no longer be available. Navigating to the PI Web API endpoint with a browser will result in an error; however, the PI Web API will continue to function as a REST API
Documentation can be found at the OSIsoft website. Alternately, users are encouraged to limit access to PI Web API built-in documentation to dedicated development environments
OSIsoft recommends users employ the following defense measures to lower the impact of exploitation for PI Web API:
Avoid adding authentication type “Anonymous” in PI Web API configuration settings to limit exposure to authenticated users only,
Consider using a web application firewall to block html responses from PI Web API servers,
Audit the AF hierarchy to ensure there are no unauthorized databases, elements, or attributes,
For Kerberos authentication configurations, use Group Policy to deny network authentication to PI Server Administrator accounts on the PI Web API server.
See the OSIsoft customer portal knowledge article for additional details and associated security updates (registration required).