The vulnerability lies in the lack of subgroup validation for elliptic curve public keys, specifically for SECT curves which have a cofactor greater than one. An attacker could provide a public key corresponding to a point on the curve but within a small subgroup. When this weak key is used in cryptographic operations like ECDH or ECDSA, it can leak bits of the victim's private key or allow for signature forgery. The patch addresses this by introducing a new centralized constructor for public keys, ECPublicKey::new, in the Rust backend. This constructor checks if the curve's cofactor is greater than one, and if so, performs an additional validation (ec.check_key()) to ensure the point is in the correct, large prime-order subgroup. All the identified vulnerable functions (EllipticCurvePublicNumbers.public_key, load_der_public_key, load_pem_public_key, and EllipticCurvePublicKey.from_encoded_point) were modified to use this new secure constructor, thus mitigating the vulnerability.