Skip to content

Distrust compromised eMudhra intermediates - #153

Merged
Seldaek merged 6 commits into
mainfrom
remove-emsign-ecc-g3/main
Oct 20, 2026
Merged

Seldaek merged 6 commits into
mainfrom
remove-emsign-ecc-g3/main

Conversation

@Seldaek

@Seldaek Seldaek commented Oct 20, 2026 •

Copy link
Copy Markdown
Member
  • Removes the emSign ECC Root CA - G3 root from the bundled cacert.pem, it cross-signed the compromised eMudhra intermediates (see https://emudhra.we-have-a-problem.com/)
  • Adds CaBundle::findDistrustedCertificate(array $chain) which looks for those intermediates (by SPKI, so the Sectigo cross-signs are covered too) in the chain presented by a server. Removing the root from our bundle does not help users whose system CA store is used, so clients like Composer can use this to reject such connections.

@paragonie-security paragonie-security left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://emudhra.we-have-a-problem.com/ the details are public now.

@Seldaek Seldaek changed the title Remove emSign ECC Root CA - G3 Distrust compromised eMudhra intermediates Oct 20, 2026
@Seldaek

Seldaek commented Oct 20, 2026 •

Copy link
Copy Markdown
Member Author

@paragonie-security happy to get another review here. It'll be combined with curl hooks in Composer that intercept requests and verify chains for bad CAs. See composer/composer#13146 also

@paragonie-security

Copy link
Copy Markdown

It'll be combined with curl hooks in Composer that intercept requests and verify chains for bad CAs. See composer/composer#13146 also

Nice. We'll look at the other PR in the morning.

- check every certificate in a multi-certificate PEM string
- search the END marker after BEGIN
- skip chain entries that are not PEM strings or X.509 certificates instead of warning
- cap DER lengths at 3 bytes to avoid int overflow on 32-bit PHP
- reject non-SEQUENCE structures and high-tag-number tags while walking the DER
@Seldaek
Seldaek merged commit a3dc8c7 into main Oct 20, 2026
26 checks passed
@Seldaek
Seldaek deleted the remove-emsign-ecc-g3/main branch October 20, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants