The vulnerability lies in the use of unanchored string matching functions like includes() and startsWith() to validate Pulumi URNs across multiple policy packs. A Pulumi URN consists of a type chain and a developer-controlled logical name. The flawed logic did not distinguish between these two parts, allowing a malicious actor to craft a logical name containing a trusted substring (e.g., a parent component type). This would trick the policy into believing the resource was a legitimate child of a hardened component, causing the policy to be bypassed and leaving the resource without its mandatory security hardening. The patch addresses this by introducing a centralized, robust URN parser (packages/policies/src/urn.ts) that correctly separates the type chain from the logical name. All vulnerable policy checks were migrated to use this new anchored parsing logic, ensuring that validation is performed only on the trusted, non-user-controllable part of the URN.