BJCA: Certificate serial numbers generated from CSPRNG seeded with insufficient entropy
Categories
(CA Program :: CA Certificate Compliance, task)
Tracking
(Not tracked)
People
(Reporter: zhangwenhua, Assigned: zhangwenhua)
Details
(Whiteboard: [ca-compliance] [policy-failure])
Attachments
(1 file)
|
123.54 KB,
text/csv
|
Details |
| Assignee | ||
Comment 1•6 days ago
|
||
Full Incident Report
Summary
-
CA Owner CCADB unique ID: A007062
-
Incident description:
Beijing Certificate Authority Co., Ltd. (BJCA) received a report from a third-party security researcher about predictable certificate serial numbers at 23:10 UTC on October 30, 2026. We initiated our emergency response and formed an incident response team. Through internal reproduction and source code review, we confirmed that the certificate serial number generation component initialized its pseudorandom number generator with seed material that had insufficient entropy, making the resulting serial numbers predictable.
Our impact assessment identified 407 affected certificates within the TLS scope. We suspended external TLS certificate issuance to contain the issue and released a corrected version of the root and subordinate CA issuance services. The corrected version uses random output from a hardware security module (HSM) to generate certificate serial numbers. We reissued the affected Online Certificate Status Protocol (OCSP) responder certificates and revoked 50 affected certificates that were still valid.
Between October 30 and November 20, 2026, we completed our initial response and documented it in a confidential incident report in Mozilla Bugzilla. We are now disclosing the relevant information in accordance with the applicable requirements.
-
Timeline summary:
-
Non-compliance start date:
The initial production version, which went live on December 19, 2019, was affected.
-
Non-compliance identified date:
We received the external report at 23:10 UTC on October 30, 2026.
-
Non-compliance end date:
We released the corrected version of the root and subordinate CA issuance services at 09:22 UTC on November 6, 2026.
-
-
Relevant policies:
CA/Browser Forum, Baseline Requirements for the Issuance and Management of Publicly-Trusted TLS Server Certificates, version 2.3.1, Sections 7.1.2.1, 7.1.2.6, 7.1.2.7, and 7.1.2.8. Official text
serialNumber| MUST be a non-sequential number greater than zero (0) and less than 2¹⁵⁹ containing at least 64 bits of output from a CSPRNG.Mozilla Root Store Policy Version 3.1, Section 5.2. Official text
CA operators MUST maintain current best practices to prevent algorithm attacks against certificates. As such, all new certificates MUST have a serial number greater than zero, containing at least 64 bits of output from a CSPRNG.
-
Source of incident disclosure:
Third Party Reported
Impact
-
Total number of certificates:
A total of 407 certificates were affected within the TLS scope, comprising two root CA certificates, 16 TLS subordinate CA certificates, and 389 end-entity certificates. The end-entity certificates include subscriber certificates and OCSP responder certificates.
-
Total number of "remaining valid" certificates:
Following the revocations, the two affected certificates within the TLS scope that remained valid were BJCA Global Root CA1 and BJCA Global Root CA2.
-
Affected certificate types:
The affected certificates include root CA certificates, TLS subordinate CA certificates, OCSP responder certificates, and TLS subscriber certificates.
-
Incident heuristic:
We first deployed the issuance services on November 28, 2019, and released the corrected version at 09:22 UTC on November 6, 2026. The affected certificates are those within the TLS scope that were issued during this period using the defective serial number generation component.
-
Was issuance stopped in response to this incident, and why or why not?
Yes. At 07:08 UTC on November 2, 2026, we suspended external TLS certificate issuance to prevent the issue from affecting additional certificates. During the suspension, we continued to process certificate revocation requests, publish certificate revocation lists (CRLs), and provide OCSP responses.
-
Analysis: N/A.
-
Additional considerations:
This defect is limited to serial-number generation on the certificate issuance application path. CA private keys, including root and subordinate CA keys, are generated and protected in hardware security modules (HSMs) and do not share the defective seeding or generator state used for serial numbers. Based on the investigation to date, we have found no indication that CA private keys were predictable or compromised because of this defect.
Timeline
All times are in UTC.
-
2019-11-28 We completed the initial service deployment.
-
2019-12-19 We issued our first root CA certificate.
-
2026-10-30 23:10 We received the third-party report by email.
-
2026-11-02 02:21 We posted a comment on the confidential bug 2087686 in Bugzilla acknowledging receipt of the issue report.
-
2026-11-02 06:04 We activated our formal emergency reporting process, discussed the incident internally, assigned response responsibilities across teams, and began the root cause analysis.
-
2026-11-02 07:08 We suspended external TLS certificate issuance to contain the issue.
-
2026-11-02 14:10 We submitted Vulnerability/Incident Disclosure Form in the confidential bug 2087686.
-
2026-11-05 10:33 We revoked the affected TLS subscriber certificates.
-
2026-11-06 09:22 Submitted the system upgrade workflow for the Root CA and Subordinate CAs and initiated service deployment.
-
2026-11-06 15:34 Issued eight G3 TLS Subordinate CA Certificates.
-
2026-11-06 18:15 Began issuing G3 OCSP Responder Certificates.
-
2026-11-06 19:05 Began reissuing G2 OCSP Responder Certificates.
-
2026-11-06 19:36 Revoked the old G2 OCSP Responder Certificates.
-
2026-11-06 21:16 Revoked the original sixteen TLS Subordinate CA Certificates.
-
2026-11-06 21:30 Updated CA certificate records in CCADB and marked the original sixteen TLS Subordinate CA Certificates as revoked.
-
2026-11-09 03:04 Issued certificates for the demonstration websites.
-
2026-11-10 02:30 We updated the CCADB records for the newly issued CA certificates.
Related Incidents
| Bug | Date | Description |
|---|---|---|
| 2087236 | 2026-10-29 | TWCA: insufficient CSPRNG output in CA/subscriber/OCSP serial numbers; relevant to scoping issuance paths and handling affected roots. |
| 2090881 | 2026-11-10 | SHECA: historical CA serials from a non-CSPRNG construction (<64-bit CSPRNG output); similar BR serial-number issue, different mechanism from our low-entropy SHA1PRNG seeding. |
| 2090925 | 2026-11-10 | CFCA: structured serials retained <64 bits of CSPRNG output after a format change; similar BR requirement failure, different from our seed/initialization defect. |
| 2087990 | 2026-11-02 | SECOM: subordinate CA serials used a sequential portion plus only 40 bits of CSPRNG output; similar 64-bit shortfall on CA certificates, different structured-format cause. |
Root Cause Analysis
Contributing Factor #1: Insufficient entropy in the seed material used for certificate serial number generation
-
Description:
Our source code review found that the certificate serial number generation component used the
SHA1PRNGalgorithm and explicitly seeded its pseudorandom number generator with seed material of insufficient entropy. All 16 bytes of each serial number came from that generator. -
Timeline:
The service already contained the affected component at its initial deployment on November 28, 2019. At 09:22 UTC on November 6, 2026, we released the corrected version of the issuance services, which uses HSM-provided random output to generate certificate serial numbers.
-
Detection:
A third-party security researcher reported the issue.
-
Interaction with other factors:
The code review described in Factor #2 missed the initialization defect, allowing it to enter the issuance process. The gaps in routine testing, certificate checks, and annual assessments described in Factor #3 allowed the defect to go undetected for an extended period.
-
Root Cause Analysis methodology used:
We compared the sample reproduction results with the source code and linked the observed serial number matches to the generator initialization behavior in the implementation we reviewed.
Contributing Factor #2: Insufficient code review coverage of random number generator security
-
Description:
Our development and code review processes focused primarily on functional correctness, interface compatibility, and runtime behavior. We paid insufficient attention to the generator’s entropy source and how its seed was explicitly set. Our acceptance criteria for custom code and code adapted from other implementations also did not adequately cover these security properties.
-
Timeline:
This gap was present when we implemented and reviewed the original compatibility change. Our remediation plan includes expanding the scope of security review and establishing quarterly code security audits, with a target completion date of November 30, 2026.
-
Detection:
The compatibility change underwent development and code review without a targeted assessment of the generator’s seeding behavior. After receiving the report, we identified the gap by comparing the scope of the original checks with the initialization behavior implicated in the reproduced issue.
-
Interaction with other factors:
The downstream controls described in Factor #3 also did not cover these implementation-level security properties.
-
Root Cause Analysis methodology used:
We used a cause-and-effect diagram to identify gaps between the checks performed during development and the security properties of the code we adopted.
Contributing Factor #3: Insufficient coverage of random number generation in routine testing, certificate checks, and annual assessments
-
Description:
We had integrated certificate compliance checks and weak-key detection, and we conducted testing and annual assessments. Certificate checks focused mainly on encoding, field validity, and compliance of the resulting certificate. The required tests for critical issuance paths did not cover the generator’s entropy source, initialization behavior, or serial number predictability. Annual assessments also gave insufficient coverage to the random number generation implementation.
-
Timeline:
This gap was present in routine controls and in annual assessments conducted before we received the report in October 2026. Our remediation plan includes dedicated serial number checks and an expanded scope for the annual CA risk assessment, with a target completion date of November 30, 2026.
-
Detection:
Serial numbers generated from seed material with insufficient entropy could still pass the existing length and range checks. Assessing their unpredictability requires verifying how they were generated. After receiving the external report, we investigated the issue through source code review and internal reproduction.
-
Interaction with other factors:
The gap in code review described in Factor #2 allowed the initialization defect described in Factor #1 to enter production. Our routine tests, certificate checks, and annual assessments also missed the defect, so it remained undetected in production for an extended period.
-
Root Cause Analysis methodology used:
We compared the existing certificate and issuance system checks with the evidence from internal reproduction and source code review. We recorded the gaps in the cause-and-effect diagram under testing, detection, and governance.
Lessons Learned
-
What went well:
Internal reproduction and source code review helped us identify the affected component. We maintained revocation and certificate status services while external TLS issuance was suspended, so relying parties could still obtain certificate status information during containment.
-
What didn’t go well:
When the seed material has insufficient entropy, the resulting serial-number bit strings can still appear statistically random. Conventional entropy-estimation or randomness-looking checks on the finished serial values therefore do not reliably detect this class of defect. Identifying the issue requires verifying the entropy source and generator initialization along the issuance path, not only inspecting the encoded output.
Service acceptance tests focused on functionality and interfaces, while checks on issued certificates covered their encoded fields. Those checks missed the initialization defect in the core issuance component. When reviewing changes of this kind, we should trace the source of randomness along the actual issuance path, examine how the generator is initialized, and verify how its output becomes a serial number. That review should determine whether the implementation meets the unpredictability requirement.
We should incorporate this implementation review into code review and dedicated testing of the issuance paths. Quarterly code security audits and annual risk assessments should sample review, testing, and remediation records to verify that the controls cover the relevant paths and operate effectively.
-
Where we got lucky:
BJCA has found no indication that the insufficient entropy was exploited or led to any security incident. All affected TLS subscriber certificates, and the affected CA certificates in the TLS hierarchies, are signed with SHA-256 or SHA-384. No practical collision attack against SHA-256 is publicly known.
-
Additional:
N/A
Action Items
| Action Item | Kind | Corresponding Root Cause(s) | Evaluation Criteria | Due Date | Status |
|---|---|---|---|---|---|
| Upgrade the affected root and subordinate CA issuance systems to use HSM-provided random output for certificate serial numbers. | Mitigate | #1 | Deployment and verification records show that the affected root and subordinate CA issuance paths use HSM-provided random output for serial number generation. | 2026-11-06 | Complete |
| Revoke the affected TLS subordinate CA certificates and end-entity certificates that were still valid. The end-entity certificates include subscriber certificates and OCSP responder certificates. Issue replacement TLS subordinate CA certificates. | Mitigate | #1 | Revocation records identify 16 TLS subordinate CA certificates and 34 end-entity certificates, including subscriber and OCSP responder certificates. Issuance records identify eight replacement G3 TLS subordinate CA certificates. | 2026-11-06 | Complete |
| Develop dedicated certificate serial number checks. | Prevent | #1, #3 | The dedicated checks cover the affected issuance paths and detect the serial number predictability issue confirmed in this incident. | 2026-11-30 | Ongoing |
| Expand code security review and establish quarterly code security audits. | Detect | #2 | The code review checklist covers generator initialization, seed entropy, and weak algorithms. The audit procedure specifies quarterly audits. Review and audit records will be used to verify execution. | 2026-11-30 | Ongoing |
| Expand annual CA risk assessments to cover cryptographic random number generation and code security audits. | Detect | #3 | The annual risk assessment procedure includes both topics. Assessment records will be used to verify that each topic was reviewed and any findings were recorded. | 2026-11-30 | Ongoing |
Appendix
Appendix I. List of Affected Certificates
See the attached file: List of Affected Certificates.csv
Updated•3 days ago
|
Updated•3 days ago
|
| Assignee | ||
Comment 2•11 hours ago
|
||
We are currently executing the pre-planned action items and will publish a status update upon completion.
Description
•