Flow Security Releases: 8.3.24, 8.4.9, 9.0.12, 9.1.7 and 9.2.5

We have tagged security updates for Flow and recommend that you update your Flow and Neos instances to these versions immediately.

The following fixes are included in the new versions 8.3.24, 8.4.9, 9.0.12, 9.1.7 and 9.2.5:

  • BUGFIX: Prevent persisting of forged serialized entities or value objects
  • BUGFIX: Escape then/else arguments of FluidAdaptor condition ViewHelpers
  • BUGFIX: Reject non-iterable operands in Doctrine Query::in()
  • BUGFIX: Forget session scoped objects on Session::destroy()
  • BUGFIX: CidrMatch handles v4 in v6 address correctly
  • BUGFIX: Anchored hash pattern in ResourceTypeConverter
  • BUGFIX: RequestPattern/Uri matches case insensitive and encoded urls
  • BUGFIX: PSR6/16 Caches handle lifetime according to spec
  • BUGFIX: Normalize property names in PropertyMappingConfiguration exclusion lists
  • BUGFIX: Respect configured collection in ResourceTypeConverter
  • BUGFIX: Trusted ProxiesMiddleware resolves clientIp correctly when multiple addresses are passed

See also:

Advisories

High

Moderate

Low

Update instructions

After update flush caches.

# all caches
./flow flow:cache:flush

# minimum
./flow flow:cache:flushone Fluid_TemplateCache

Breaking changes

Only a single trusted proxy header per type is supported

The Neos.Flow.http.trustedProxies.headers options (clientIp, host, port, proto, or the single string form) no longer accept comma-separated lists of headers. A proxy only sets or appends to the one header it is responsible for. Any other header in the list was passed through unchanged from the client, so the client could choose which value was used. Configurations that still contain a list now throw an InvalidConfigurationException. To fix this, configure only the one header your proxy actually sets (the default is X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Port and
X-Forwarded-Proto), or Forwarded.

Also, setting trustedProxies.proxies to '*' is now deprecated and will be removed with Flow 10.0. It trusts every client as a proxy and must only be used in local development environments, never in production. Configure the addresses or address ranges of your proxies instead.

Escape then/else arguments of FluidAdaptor condition ViewHelpers

The then and elsearguments of the condition ViewHelpers (f:security.ifAccess, f:security.ifHasRole, f:security.ifAuthenticated, f:validation.ifHasErrors, Neos’ IfModuleAccessibleViewHelper) and every custom condition ViewHelper are now HTML-escaped like the core f:if. Templates that intentionally pass markup through variables in these arguments must use {value -> f:format.raw()} or <f:then>/<f:else> child nodes instead.

IP pattern matching with IPv4-mapped IPv6 addresses

IPv4-mapped clients (::ffff:a.b.c.d) are now compared as IPv4. IPv4 CIDR patterns no longer match unrelated IPv6 addresses, and exact entries like 10.0.0.5 now match ::ffff:10.0.0.5. Patterns with an invalid prefix (10.0.0.0/, /abc, /24/x, /129) now never match. Before, some of them matched every address.

Credits / Contributions

Many thanks to the reporter of the issues:

And the the team working on the fixes: