# Apple container pf rule injection in container system dns create

Source: https://junglewise.ai/threats/apple-container-pf-rule-injection-in-container-system-dns-create-9afe0647  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-07. Updated: 2026-07-16  
License: CC BY 4.0 with a link back

Severity: low · CVSS 1.9 · Published 2026-05-07

A vulnerability in the Apple 'container' tool allows a local user with restricted administrative privileges to bypass security controls and inject arbitrary firewall rules into the macOS kernel. This tool is typically used to manage networking for containers, and an exploit could allow an attacker to redirect network traffic to malicious servers or block legitimate connections, potentially leading to data interception or service outages. The issue occurs because the tool fails to properly check domain names for hidden commands before writing them to the system's firewall configuration.

Technologies: [Apple Container](https://junglewise.ai/threats/technologies/container). Vendors: [Apple](https://junglewise.ai/threats/vendors/apple), [Swift](https://junglewise.ai/threats/vendors/swift).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 1.9, published 7 May 2026.

**Which products and versions are affected?** Apple Container <= 0.12.2; github.com/apple/container (Swift) <= 0.12.2.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is This vulnerability attacked?** It is attacked with local access, in an operating system.

**Am I affected?** Check whether you run Apple Container or github.com/apple/container (Swift) at an affected version. 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 command injection vulnerability exists in Apple's 'container' utility (<= 0.12.2) within the 'container system dns create --localhost' command. The 'domainName' argument is passed unsanitized into the Packet Filter (pf) anchor file (/etc/pf.anchors/com.apple.container) as a comment. By including a newline character (\n) in the domain name, a local attacker can break out of the comment context and inject arbitrary pf directives (such as pass, block, or nat) with fully controlled source and destination IPs. This effectively bypasses sudo delegation where an administrator may have granted a user limited root access to manage DNS redirects. The vulnerability is caused by the DNSCreate component failing to call the existing isValidDomainName() validation function. A fix is available in version 0.12.3.

## Affected products

- Apple container <= 0.12.2

## Timeline

- 2026-04-30: disclosed: Initial disclosure to vendor
- 2026-05-07: advisory: GitHub Advisory published
- 2026-07-16: other: Advisory updated

## References

- [https://api.github.com/users/XlabAITeam](https://api.github.com/users/XlabAITeam)
- [https://github.com/XlabAITeam](https://github.com/XlabAITeam)
- [https://api.github.com/users/XlabAITeam/gists%7B/gist_id%7D](https://api.github.com/users/XlabAITeam/gists%7B/gist_id%7D)
- [https://api.github.com/users/XlabAITeam/repos](https://api.github.com/users/XlabAITeam/repos)
- [https://avatars.githubusercontent.com/u/214060066?v=4](https://avatars.githubusercontent.com/u/214060066?v=4)
- [https://api.github.com/users/XlabAITeam/events%7B/privacy%7D](https://api.github.com/users/XlabAITeam/events%7B/privacy%7D)

## Related threats

- [Apple Container digest verification bypass in image pull](https://junglewise.ai/threats/cve-2026-113957-an-attacker-who-controls-the-registry-a-mirror-or-the-network)
- [Apple Container arbitrary command execution via Kubernetes plugin](https://junglewise.ai/threats/cve-2026-113951-if-an-attacker-can-write-to-the-filesystem-of-a-container-k8s)
- [Apple container TCP port forwarder memory exhaustion](https://junglewise.ai/threats/cve-2026-64773-apple-container-tcp-port-forwarder-memory-exhaustion)
- [Apple container build filesystem symlink escape](https://junglewise.ai/threats/cve-2026-64777-apple-container-build-filesystem-symlink-escape)
- [Users who connect to malicious registries with hostnames matching the bypass patterns will have their registry…](https://junglewise.ai/threats/cve-2026-28909-users-who-connect-to-malicious-registries-with-hostnames-matching)
