GHSA-ffhw-jhcg-cg73: 
PHP Analyse et atténuation de la vulnérabilité

What goes wrong

RC2CBCAlgorithmIdentifier reads the RC2 parameter version as an integer and turns it into a number of effective key bits. RFC 2268 maps the versions 0 to 255 through a table, and a larger version is the number of bits itself. A negative version matched neither case. The table lookup returned null, and the int return type of _versionToEKB() turned it into a TypeError. A TypeError is an Error, not an Exception. It escapes the catch (Exception) blocks that callers put around decoding, and it is none of the exceptions the decoders document. Every AlgorithmIdentifier goes through AlgorithmIdentifierFactory, whatever the field. An rc2-cbc identifier with the parameters SEQUENCE { INTEGER -1, OCTET STRING (8 bytes) } takes 27 bytes. In a subjectPublicKeyInfo, a signature algorithm field or a private key algorithm, it reaches Certificate::fromDER(), CertificationRequest::fromDER(), AttributeCertificate::fromDER(), PublicKeyInfo::fromDER() and PrivateKeyInfo::fromDER(), before any signature is checked. Two other values read from an encoding were refused with the InvalidArgumentException their constructors use for a bad argument. This is an Exception, but not one the decoders document. They are an Ed25519 or Ed448 signature value of the wrong length, reached from Certificate::fromDER(), CertificationRequest::fromDER() and AttributeCertificate::fromDER(), and an EC point whose first octet is not 02, 03 or 04, reached from PublicKeyInfo::publicKey(), PublicKey::fromPEM(), ECPublicKey::fromPEM() and ECPrivateKey::publicKey().

Impact

An application that parses certificates, certification requests, attribute certificates or keys it receives can be made to fail with an error it does not expect. With catch (Exception), the request ends with an uncaught error, an HTTP 500 instead of a validation error for instance. A long running worker that does not catch Throwable stops. The input needs no key and no trust: the identifier is decoded before anything is verified. Libraries that parse certificates from untrusted sources are exposed in the same way. This includes web-auth/webauthn-lib, which parses the attestation certificates an authenticator sends during a registration, and web-auth/cose-lib, which parses the certificates of a COSE x5chain.

Affected versions

All versions up to 1.6.3. The table lookup has not changed since 1.0.0.

Patches

1.6.4. A negative RC2 version is refused with an UnexpectedValueException, the exception the identifier already throws for its other malformed parameters. Versions 0 to 255 and above keep their meaning. Signature::fromSignatureData() now reports an Ed25519 or Ed448 signature of the wrong length as a DecodeException, like a malformed ECDSA signature. PublicKeyInfo::publicKey(), ECPublicKey::fromPEM() and ECPrivateKey::publicKey() report an invalid EC point as an UnexpectedValueException, like the other key types. The public constructors still throw InvalidArgumentException when the caller passes a bad value.

Workarounds

Catch Throwable around the decoding of untrusted certificates, requests and keys, and treat a TypeError or an InvalidArgumentException as a refused input.


Source: NVD

Connexe PHP Vulnérabilités :

CVE ID

Gravité

Partition

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

GHSA-rrcw-wmw5-fhhfMEDIUM5.9
  • PHP logoPHP
  • spomky-labs/pki-framework
NonOuiDec 05, 2026
GHSA-cw43-4q57-3pf3MEDIUM5.9
  • PHP logoPHP
  • spomky-labs/pki-framework
NonOuiDec 05, 2026
GHSA-8455-6cc5-5q3xMEDIUM5.9
  • PHP logoPHP
  • spomky-labs/pki-framework
NonOuiDec 05, 2026
GHSA-ffhw-jhcg-cg73MEDIUM5.3
  • PHP logoPHP
  • spomky-labs/pki-framework
NonOuiDec 05, 2026
GHSA-cj2p-wqcw-66qfMEDIUM5.3
  • PHP logoPHP
  • spomky-labs/pki-framework
NonOuiDec 05, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité afin d’évaluer votre niveau de risque et d’identifier les lacunes dans vos défenses.

Évaluation de la demande

Ressources Wiz supplémentaires

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités