# GHSA-4qpf-57w4-m3wc: Ip Constraint public/private Modes Accept IPv4-Mapped and IPv4-Compatible IPv6 Addresses

DevFeed: [GHSA-4qpf-57w4-m3wc: Ip Constraint public/private Modes Accept IPv4-Mapped and IPv4-Compatible IPv6 Addresses](<https://devfeed.tech/articles/ghsa-4qpf-57w4-m3wc-ip-constraint-public-private-modes-accept-ipv4-mapped-and-ipv4-compatible-ipv6-addresses-116458.md>)

Original publisher: [Read original article](<https://symfony.com/blog/ghsa-4qpf-57w4-m3wc-ip-constraint-public-private-modes-accept-ipv4-mapped-and-ipv4-compatible-ipv6-addresses>)

Author: Fabien Potencier

Published: 2026-11-04T11:54:00Z

Content type: news

Language: en

Sources: [Symfony](<https://devfeed.tech/sources/symfony-blog.md>)

Topics: [ip-address-planning](<https://devfeed.tech/topics/ip-address-planning.md>), [trust](<https://devfeed.tech/topics/trust.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [7-4](<https://devfeed.tech/tags/7-4.md>), [added](<https://devfeed.tech/tags/added.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [applications](<https://devfeed.tech/tags/applications.md>), [behaviour](<https://devfeed.tech/tags/behaviour.md>), [component](<https://devfeed.tech/tags/component.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [ip](<https://devfeed.tech/tags/ip.md>), [ipv4](<https://devfeed.tech/tags/ipv4.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [issue](<https://devfeed.tech/tags/issue.md>), [private](<https://devfeed.tech/tags/private.md>), [public](<https://devfeed.tech/tags/public.md>), [security](<https://devfeed.tech/tags/security.md>), [symfony](<https://devfeed.tech/tags/symfony.md>), [this](<https://devfeed.tech/tags/this.md>)

## AI overview

Symfony Validator's filtered `Ip` modes relied only on PHP's range flags, which could accept non-public addresses, including IPv4-mapped IPv6 forms and entire special-purpose ranges. This could bypass applications using these modes as an internal-address guard; the default `V4` mode does no range filtering and is not affected by this issue. The fix adds non-public subnet checks on top of `filter_var()` for `NO_PRIV`, `NO_RES` and `ONLY_PUBLIC` (renamed `NO_PRIVATE` and `NO_RESERVED` from Symfony 7.0), while leaving unfiltered `V4`, `V6` and `ALL` unchanged. All three filtered modes now reject non-public addresses, so some previously accepted values are rejected; on PHP built without IPv6 support, they reject all IPv6 addresses. Validator duplicates HttpFoundation's subnet list because it cannot depend on that component. Affected versions are fixed in 5.4.56, 6.4.50, 7.4.23 and 8.1.11.

## Source excerpt

Affected versions Symfony Validator versions <5.4.56, >=6, <6.4.50, >=7, <7.4.23, >=8, <8.1.11 are affected by this security issue. The issue has been fixed in Symfony Validator 5.4.56, 6.4.50, 7.4.23, 8.1.11. Description Symfony\Component\Validator\Constraints\IpValidator...