Skip to main content
CVE Vulnerability Database

CVE-2025-2745: AVEVA PI Web API XSS Vulnerability

CVE-2025-2745 is a cross-site scripting flaw in AVEVA PI Web API that lets authenticated attackers inject malicious JavaScript through annotations or media files. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2025-2745 Overview

CVE-2025-2745 is a stored cross-site scripting (XSS) vulnerability in AVEVA PI Web API version 2023 SP1 and prior. The flaw allows an authenticated attacker with permission to create or update annotations, or upload media files, to persist arbitrary JavaScript within annotation attachments. Execution requires a victim to disable Content Security Policy (CSP) protections while rendering the annotation in a web browser. The issue is tracked under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

An authenticated operator can plant persistent JavaScript in PI Web API annotations that executes against other users who bypass CSP, enabling session theft and unauthorized actions within industrial monitoring workflows.

Affected Products

  • AVEVA PI Web API 2023 SP1
  • AVEVA PI Web API versions prior to 2023 SP1
  • PI System deployments exposing annotation and media upload endpoints

Discovery Timeline

  • 2025-06-12 - CVE-2025-2745 published to the National Vulnerability Database
  • 2025-06-12 - CISA publishes advisory ICSA-25-162-08
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-2745

Vulnerability Analysis

The AVEVA PI Web API exposes REST endpoints that allow authenticated users to attach annotations and upload media files to PI System data references. The application persists user-supplied annotation content without adequate output encoding when the data is later rendered in a browser context.

Because the payload is stored server-side, every subsequent viewer of the affected annotation retrieves the attacker-controlled markup. The exploit path depends on a victim explicitly disabling the Content Security Policy that would otherwise block inline script execution. Social engineering, such as a prompt to "enable content" for a broken attachment preview, drives the CSP bypass.

Once script execution occurs, the attacker inherits the victim's PI Web API session context. Consequences include exfiltration of process data, manipulation of annotations, and lateral pivoting into other operator dashboards that trust the compromised session.

Root Cause

The root cause is insufficient neutralization of HTML and JavaScript content within stored annotation attachments and media upload metadata. Server-side validation does not strip or encode active script content before persistence, and client-side rendering relies on CSP as the sole runtime mitigation.

Attack Vector

Exploitation requires network access to the PI Web API and low-privileged authenticated access with permission to create or update annotations or upload media. The attacker submits a crafted annotation payload containing JavaScript. Delivery to the victim requires user interaction: the victim opens the annotation and disables CSP protections in the browser, as directed by the attacker.

The vulnerability manifests through the annotation and attachment rendering pipeline. Refer to the CISA Advisory ICSA-25-162-08 and AVEVA Cyber Security Updates for vendor-supplied technical details.

Detection Methods for CVE-2025-2745

Indicators of Compromise

  • Annotation records or attachment metadata containing <script>, onerror=, onload=, or javascript: sequences
  • PI Web API audit entries showing annotation create or update operations from unexpected user accounts
  • Uploaded media files with mismatched MIME types or embedded HTML content
  • Browser telemetry indicating CSP overrides on hosts that render PI Vision or PI Web API content

Detection Strategies

  • Query PI Web API annotation stores for HTML tags, event handlers, and script URIs within text and attachment fields
  • Correlate annotation write events with the source account's expected operational role and change window
  • Inspect web server access logs for POST and PATCH calls to /annotations and /attachments endpoints followed by unusual GET requests from operator workstations

Monitoring Recommendations

  • Forward PI Web API application and IIS logs to a centralized analytics platform for content and behavioral inspection
  • Alert on browser extensions or group policy changes that disable CSP enforcement on engineering workstations
  • Track annotation authorship metrics and flag accounts exhibiting unusual write volumes or off-hours activity

How to Mitigate CVE-2025-2745

Immediate Actions Required

  • Apply the AVEVA-supplied update for PI Web API as documented in the AVEVA Cyber Security Updates portal
  • Audit annotation and media upload permissions and revoke write access for accounts that do not require it
  • Educate operators to never disable browser CSP protections when prompted while viewing PI content
  • Review existing annotations for embedded script content and remove suspicious entries

Patch Information

AVEVA has released updates addressing CVE-2025-2745 for PI Web API. Consult the vendor advisory portal and CISA Advisory ICSA-25-162-08 for supported target versions and upgrade guidance specific to your PI System deployment.

Workarounds

  • Restrict annotation create, update, and media upload privileges to a minimal set of trusted engineering accounts
  • Enforce Content Security Policy at the reverse proxy layer so client-side overrides do not affect rendering
  • Segment PI Web API interfaces on isolated management VLANs with strict allowlisting to authorized operator workstations
  • Disable or block browser extensions capable of stripping CSP headers on hosts that access PI Vision
bash
# Example: enforce a strict Content-Security-Policy header at an IIS reverse proxy
# web.config outbound rule (illustrative)
<rewrite>
  <outboundRules>
    <rule name="Add-CSP">
      <match serverVariable="RESPONSE_Content-Security-Policy" pattern=".*" />
      <action type="Rewrite"
              value="default-src 'self'; script-src 'self'; object-src 'none'; frame-ancestors 'none'" />
    </rule>
  </outboundRules>
</rewrite>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.