# CVE-2017-5329: Palo Alto Networks Terminal Services Agent privilege escalation

Source: https://junglewise.ai/threats/cve-2017-5329-palo-alto-networks-terminal-services-agent-privilege-escalation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-01-27. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

CVE-2017-5329 · Severity: high · CVSS 7.8 · Published 2017-01-27

The Palo Alto Networks Terminal Services Agent, which identifies users on multi-user Windows systems for security policy enforcement, contains a flaw that allows a local user to gain administrative control. By running a malicious program on a system where the agent is installed, an attacker can bypass security restrictions and take full control of the machine. This could lead to unauthorized access to sensitive data or the disruption of corporate network security policies.

Vendors: [Paloaltonetworks](https://junglewise.ai/threats/vendors/paloaltonetworks).

## Quick answers

**Is CVE-2017-5329 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-5329 being exploited in the wild.

**How severe is CVE-2017-5329?** High severity, with a CVSS score of 7.8, published 27 January 2017.

**Which products and versions are affected?** Palo Alto Networks Terminal Services Agent 6.0, 7.0.0 through 7.0.6.

**Is there a fix for CVE-2017-5329?** A patch was published on 2017-01-27: NVD publication date; fix available in version 7.0.7 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2017-5329 attacked?** It is attacked with local access, in a network appliance.

**Am I affected by CVE-2017-5329?** Check whether you run Paloaltonetworks Terminal Services Agent. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A local privilege escalation vulnerability exists in the Palo Alto Networks Terminal Services Agent (specifically the panta.sys driver) due to an integer overflow. When processing a specific IOCTL (0x88002200), the driver performs a multiplication on a user-supplied size value that can wrap around, leading to a small pool allocation. A subsequent loop uses the original, large size value to perform a memset or write operation, resulting in an out-of-bounds write (CWE-787) into kernel memory. An attacker with local access can exploit this to execute arbitrary code with kernel-level privileges. The issue is resolved in Terminal Services Agent version 7.0.7.

## Affected products

- Palo Alto Networks Terminal Services Agent 6.0, 7.0.0 through 7.0.6

## Timeline

- 2017-01-26: advisory: Palo Alto Networks published security advisory PAN-SA-2017-0001
- 2017-01-26: disclosed: Exploit code published on Exploit-DB by Parvez Anwar
- 2017-01-27: patched: NVD publication date; fix available in version 7.0.7

## References

- [http://www.securityfocus.com/bid/95818](http://www.securityfocus.com/bid/95818)
- [https://security.paloaltonetworks.com/CVE-2017-5329](https://security.paloaltonetworks.com/CVE-2017-5329)
- [https://www.exploit-db.com/exploits/41176/](https://www.exploit-db.com/exploits/41176/)

## Related threats

- [Palo Alto Networks Terminal Services Agent user spoofing](https://junglewise.ai/threats/cve-2017-5328-palo-alto-networks-terminal-services-agent-user-spoofing)
