A PAC file is a Proxy Auto-Configuration file that tells a browser or other client which proxy to use for a given destination. It contains JavaScript-like rules that match URLs, hosts, or IP ranges and return proxy routing decisions, which can shape traffic inspection, privacy, and access control.
What the PAC file actually does
A PAC file is a client-side routing policy, not a proxy itself. It gives the browser or other application logic for choosing a proxy, going direct, or sending different destinations through different inspection and access paths. That makes it a small file with outsized influence over how traffic is steered and controlled.
Because the decision happens before the request leaves the client, a PAC file can affect whether traffic is inspected, bypassed, split by destination, or routed to different network controls. In practice, that means the file can become part of web security architecture, remote access design, and exception handling.
How PAC logic is evaluated
PAC files typically use JavaScript-like functions, most often FindProxyForURL, to match a URL, host, domain, or IP range and return a proxy directive. The decision logic may be simple, but it is still policy code, which means readability and change control matter. Small errors can change routing for entire classes of traffic.
The policy can incorporate conditions such as internal domains, local addresses, failover ordering, or destination-specific proxies. That flexibility is useful, but it also creates hidden complexity because the effective behaviour depends on the client, the browser, network location, and any surrounding auto-discovery or configuration mechanism.
For a broader design view, the SASE and SSE Guide helps place PAC routing decisions in the wider context of cloud-delivered security and traffic steering.
Why PAC files matter for filtering and access control
PAC files often sit between user convenience and security enforcement. They can direct managed traffic through a secure web gateway, keep internal traffic on a different path, or create exceptions for destinations that should not be proxied. That makes them relevant to web filtering, split tunnelling, remote access, and control consistency.
The same mechanism can also be used to weaken enforcement if exceptions become too broad or are copied into unmanaged endpoints. When proxy decisions are spread across browsers and devices, the organisation must know which destinations are protected by inspection and which are being sent elsewhere. The Secure Web Gateway and Web Filtering Guide is the most direct companion for understanding how PAC files support or bypass web gateway policy.
PAC files also interact with endpoint policy in a way that can make local user control or physical device access consequential. If a device is trusted to run the PAC logic, that trust decision affects all downstream routing choices, so configuration ownership and endpoint control both matter.
Operational failure modes and common mistakes
The main failure modes are misrouting, bypass, and inconsistency. A malformed rule can send traffic direct when it should be inspected, or send internal traffic through an external proxy path that adds latency or breaks applications. A stale PAC file can also create outages when destinations, proxies, or failover rules change but the client never receives the update.
Another common issue is assuming the PAC file is an enforcement boundary rather than a steering mechanism. If an attacker or insider can alter the file, change its retrieval source, or influence how the client resolves it, the security model can shift without obvious alerting. That is why PAC logic should be treated as policy configuration with integrity requirements, not as harmless convenience code.
Where PAC files fit in modern secure access architectures
PAC files are still used because they are lightweight and flexible, especially in environments that mix legacy proxying with cloud security services. They can support migration from on-premises proxies to SASE or SSE, help distinguish managed from unmanaged destinations, and preserve special handling for corporate services, testing environments, or regional routing.
They work best when the routing intent is clear, the exceptions are limited, and the logic is maintained alongside the broader access architecture. In other words, the PAC file should express policy that already exists, not become the only place where routing decisions are understood. For web access design that relies on routing, gateway policy, and exceptions, the same routing logic can be easier to govern when paired with the right security architecture reference rather than left as an isolated script.
That is also why documentation, review, and testing matter. A PAC file that is technically correct but poorly understood can still create privacy leakage, inspection gaps, or a false sense of control.
Risk and Threat Considerations
PAC files can create a security gap when proxy routing is used as part of web inspection or access policy, because a bad rule, stale file, or compromised distribution path can silently redirect traffic around intended controls. The risk is not the file format itself, but the fact that client-side routing decisions can change what is inspected, logged, or allowed.
Failure mechanism: An attacker, misconfiguration, or unmanaged endpoint can alter proxy selection so that sensitive destinations are sent direct, routed to an untrusted proxy, or excluded from inspection. That creates bypass, confidentiality loss, and inconsistent enforcement across users and devices.
Impact: Organisations can lose visibility into web traffic, miss malicious downloads or command-and-control activity, and allow policy exceptions to become a durable evasion path. In large environments, the same flaw can affect many clients at once.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5, CIS Controls v8 and NIST CSF 2.0 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | SC-7 — Boundary Protection | PAC files steer traffic through protected network boundaries and proxy enforcement paths. |
| CM-7 — Least Functionality | PAC logic should expose only the routing exceptions needed for business use. | |
| Recommendation — Validate PAC routing rules so outbound traffic is forced through approved proxy inspection paths. Minimise PAC exceptions and remove routing paths that are not explicitly required. | ||
| CIS Controls v8 | CIS-12 — Network Infrastructure Management | PAC files are network-policy artefacts that affect routing, filtering, and control consistency. |
| Recommendation — Manage PAC files as controlled network configuration and test changes before deployment. | ||
| NIST CSF 2.0 | PR.PS-01 — Configuration Management | PAC files are configuration items whose integrity directly affects protective routing. |
| Recommendation — Govern PAC file changes through approved configuration management and version control. | ||
| ISO/IEC 27001:2022 | A.8.9 — Configuration management | PAC files are configuration artefacts that must be controlled to preserve secure proxy behaviour. |
| Recommendation — Maintain PAC files under formal configuration control with review and approval. | ||
Practitioner Guidance
Why practitioners should care: A PAC file is part of the control plane for outbound web access, so it deserves the same ownership discipline as other security policy code. Treat it as a governed artefact with clear change control, testing, and rollback.
What to watch for: Look for broad bypass rules, hard-coded exceptions, unmanaged distribution, and PAC logic that differs by endpoint class without a documented reason. The most dangerous PAC files are the ones that work most of the time and fail quietly when policy changes.
Practitioner takeaway: Keep PAC logic simple, documented, and aligned with the proxy and inspection architecture it is meant to support.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 16, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org