B41/100
Vulnerability · medium
Rebuilding MuPDF PDF key generator reveals nine bits of randomness in AES-256 files
Tier B · Patch this week – Put it in the sprint
Who’s exposed: Users of MuPDF before 1.28.5 creating AES-256 encrypted PDFs
Tier B because: Exploited in the wild OR public exploit
Reach
Attack
Damage
Fix
Public exploit
What to do
- Upgrade MuPDF to version 1.28.5 or later
The Brief
- MuPDF versions before 1.28.5 wrote AES-256 encrypted PDFs whose 256-bit file key depended on nine bits of randomness.
- The key was cut from one of only 512 possible byte streams, because it came from a 48-bit linear congruential generator seeded with the clock.
- The AES cipher itself was not the problem; the weakness was in key generation.
Why it matters
PDFs encrypted by affected MuPDF versions may have keys drawn from a space of only 512 possibilities, so their protection is much weaker than AES-256 suggests.
The checklist behind the tier
Checklist · 2 of 10 yes
| Yes | Hits tech teams | Judgment: MuPDF is a PDF library and renderer used in developer tooling and enterprise software. |
| No | Core infrastructure | Judgment: a single PDF library is not software nearly every team runs. |
| No | Popular tool | Judgment: MuPDF is a specialised library, not a mainstream developer framework or platform. |
| No | Exploited in the wild | DEV Community: the post describes a key-generator weakness and a rebuild; it reports no observed attacks. |
| Yes | Public exploit | DEV Community: the post publishes a Python rebuild of the key generator, a working key-recovery PoC. |
| No | Remote, no login | DEV Community: the weakness needs an encrypted PDF file, not unauthenticated network access. |
| No | Full takeover | DEV Community: the flaw reduces AES-256 key entropy to nine bits; it gives no code execution or admin rights. |
| No | Secrets exposed | DEV Community: the post reports a cryptographic weakness; no stolen or exposed data is mentioned. |
| No | Supply chain | DEV Community: no compromised package, update, build pipeline or signing key is described. |
| No | No fix yet | DEV Community: the flaw affects versions before 1.28.5, implying a fixed version exists. |
Source
Rebuilding MuPDF's old PDF key generator in Python: nine bits of randomness behind AES-256 ↗ DEV Community: python · 1h ago
First seen · 1 source · Full story page · How tiers are decided