Summary
A path traversal vulnerability in Notepad++ WinGup can allow untrusted ZIP entry names to escape the intended extraction directory and overwrite files in a neighboring plugin location. If an attacker can supply or influence a ZIP archive and the affected plugin is later loaded, this may result in execution of attacker-controlled code.
Affected context
The issue occurs in the WinGup decompression workflow when ZIP archive entry names are combined with a destination directory without sufficient canonical containment validation. Deployments may be at risk when an attacker can provide, replace, or influence an archive processed by Notepad++ and a writable plugin or executable location is reachable through the extraction path.
Exploit preconditions
- Attack surface: WinGup ZIP archive extraction
- Required access: Ability to provide or influence an archive processed by Notepad++
- Trigger point: Decompression of archive entries
- Required condition: The extraction destination or a neighboring plugin path must be writable
- Why exploitation is possible: Archive entry paths are joined to the destination without reliable canonical containment enforcement
Why this happens
The underlying bug is an archive extraction path validation failure. The decompression logic trusts ZIP entry names after combining them with the extraction destination, rather than resolving the resulting path and confirming that it remains within the intended directory. This behavior maps to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, and can permit writes to unintended filesystem locations.
Potential impact
- An attacker-controlled DLL may be written to a plugin directory
- Notepad++ may execute attacker-controlled code when loading the affected plugin
- User data or application files may be overwritten
- The application runtime and associated user account may be compromised
- Malicious files may persist across subsequent application launches
General mitigation guidance
Mitigation generally centers on enforcing canonical extraction boundaries and
reducing trust in archive metadata.
Common defensive patterns include:
- Resolve each archive entry against the destination and reject paths outside the intended root
- Normalize separators, dot segments, drive identifiers, and symbolic-link effects before writing
- Use extraction libraries or APIs that provide secure-by-default containment checks
- Restrict archive sources and require integrity or authenticity verification where practical
- Prevent extraction workflows from writing to executable or plugin directories unless explicitly required
- Run the application with least-privilege filesystem permissions
- Use controlled plugin loading and application allowlisting where feasible
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis rules for archive extraction followed by direct path concatenation
- Code review checks requiring canonical containment validation before file creation
- Tests using traversal-style archive names and platform-specific path forms
- File integrity monitoring for unexpected changes in plugin and executable directories
- Endpoint telemetry correlating archive extraction with newly created DLLs and subsequent application loads
- Policy enforcement that blocks untrusted archives from writing to protected application paths

