llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · php-standard-library/mime

GHSA-7H2C-65CX-P93W

S/MIME Verifier trusts signatures made with any self-signed certificate when it has no trust anchors

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión6.4.0
Exposición24 dDesde la divulgación, 27 oct 2026, 8:46 p. m.
Detección22 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Ni alarma ni olvido: seguimiento.Ojo con los rangos de versión, son traicioneros.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
28 oct 26
19 nov 26
21 nov 26
28 oct 26
3 nov 26
9 nov 26
15 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-7H2C-65CX-P93W divulgada · CVSS 7.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Impact

`Psl\MIME\SMIME\Verifier::verify()` checks the signer's certificate chain by default (`verifyCertificateChain: true`). When the verifier had no trust anchors, which is the constructor default (`new Verifier()`), this check accepted any signer certificate that is self-signed. The constructor documentation says that an empty list means no chain validation is possible, but the code treated every self-signed certificate as trusted instead of failing.

An attacker can create a self-signed certificate with any subject and email address, sign arbitrary content with it, and send it to the application. `verify()` returns a `VerificationResult` with `valid` set to `true` and the attacker's certificate as `signerCertificate`, so an application that treats `valid` as proof that a trusted party signed the content, or that compares the email address in the signer certificate with the sender, accepts forged content.

Applications are affected when they verify S/MIME or CMS signed data from untrusted sources with `Verifier` constructed without trusted certificates and chain verification left enabled. The attack is remote and needs no authentication or user interaction: the attacker only has to get a signed message to the application, for example by email. Applications that pass `verifyCertificateChain: false` never received a trust decision from the verifier and are not affected by this part.

A second, narrower flaw affected verifiers configured with trust anchors: the signer certificate only had to be signed directly by one of the trusted certificates, and its key usage and extended key usage were not checked. A certificate that a trusted CA issued for another purpose, such as a TLS server certificate, was accepted as an S/MIME signer. Exploiting this needs a certificate and private key issued by a configured CA.

Patches

Fixed in 6.4.0 https://github.com/php-standard-library/php-standard-library/releases/tag/6.4.0.

  • An empty list of trusted certificates now fails chain verification instead of trusting self-signed certificates.
  • The signer certificate is the one named by the identifier of the first `SignerInfo`, as RFC 5652 requires, instead of the first certificate embedded in the message.
  • OpenSSL validates the chain against the configured trust anchors only (the system CA store is not consulted), building it through intermediates embedded in the message and checking validity periods, CA `basicConstraints` and the S/MIME signing purpose of the signer certificate.
  • Verification now writes certificates to a private temporary directory, so it needs a writable `sys_get_temp_dir()` within `open_basedir`.

Workarounds

  • Always construct `Verifier` with the certificates you trust, for example `new Verifier([$caCertificatePem])`. With a non-empty list, a self-signed certificate that is not in the list is rejected on affected versions.
  • If a configured CA also issues certificates for other purposes, check the signer certificate after verification yourself, or pin the expected signers by comparing `openssl_x509_fingerprint($result->signerCertificate, 'sha256')` with a list of known fingerprints.

References

  • RFC 5652 sections 5.3 and 10.2.4 (SignerInfo, SignerIdentifier and IssuerAndSerialNumber)
  • RFC 5280 section 6 (certification path validation)
  • RFC 8550 (S/MIME 4.0 certificate handling)
  • https://github.com/php-standard-library/php-standard-library/releases/tag/6.4.0

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
php-standard-library/mime · php-standard-library/php-standard-library≥ 6.2.0 < 6.4.0
6.2.0
6.4.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistphp-standard-library/mime
Corregida 6.4.0 — —
Packagistphp-standard-library/php-standard-library
Corregida 6.4.0 — —
Versiones corregidas6.4.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/php-standard-library/php-standard-library/security/advisories/GHSA-7h2c-65cx-p93w

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.