Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is the Logjam Attack?

Logjam downgrades a TLS connection to 512-bit export-grade Diffie-Hellman, which an attacker can break in real time thanks to precomputation against a handful of shared prime numbers.

Illustration for the cybersecurity term Logjam
Home / Blog / Cybersecurity Terms / What Is the Logjam Attack?
17 November 2026

What Is the Logjam Attack?

What Is the Logjam Attack?

Logjam, published in May 2015 by a team of researchers from INRIA, Microsoft Research, Johns Hopkins, and the Universities of Michigan and Pennsylvania, is a downgrade attack against the Diffie-Hellman key exchange in TLS. An active attacker on the network convinces a server to negotiate deliberately weakened 512-bit export-grade parameters, then breaks the resulting key and reads or modifies the session. It is tracked as CVE-2015-4000, and its real contribution was showing that the cost of attacking Diffie-Hellman had been badly misjudged.

A Policy Decision From 1992

Until the late 1990s, United States export regulations limited cryptography in software sold abroad to 512 bits. Vendors complied by building two modes into their products: full strength for domestic use and “export grade” for everything else. The rules were relaxed in 2000, but the weak cipher suites stayed in the code, dormant, for the next fifteen years.

Logjam woke them up, as did FREAK for RSA a few months earlier. Both are reminders that a protocol option retained for compatibility is an option an attacker can select on your behalf.

How the Downgrade Works

In a Diffie-Hellman key exchange the server chooses the group parameters—a large prime and a generator—and sends them to the client during the handshake. Critically, in TLS 1.2 and earlier the parameters themselves are not bound to the negotiated cipher suite in a way the client can verify before the handshake completes.

The attacker sits in the path and edits the client’s list of offered cipher suites so that only DHE_EXPORT remains. The server, if it still supports export mode, replies with a 512-bit prime. The client has no way to tell that it did not ask for this, because the server’s signature covers the parameters but not the suite the client originally offered. Both sides complete the handshake, and the attacker only needs to solve one 512-bit discrete logarithm to recover the session key and finish the handshake in both directions.

Why Precomputation Made It Practical

Solving a discrete logarithm with the number field sieve has two stages. The first and by far the most expensive depends only on the prime, not on the particular key exchange. Once that work is done, individual logarithms for that prime can be computed in about a minute.

The researchers found that servers overwhelmingly reused a tiny number of hard-coded primes. A single 512-bit prime shipped with Apache covered a large share of vulnerable hosts; another came from mod_ssl. Precomputing against two primes therefore put real-time attacks within reach of a well-resourced individual, and the authors estimated that an academic team could reach 768-bit, while a nation state could plausibly have completed the precomputation for a 1024-bit prime—which, they pointed out, would explain passively decrypted VPN traffic described in leaked intelligence documents.

At publication, 8.4% of the top one million HTTPS sites were vulnerable, along with substantial proportions of SMTP StartTLS, IMAPS, POP3S, and IKE endpoints used for IPsec VPNs.

Fixing It

The remediation is configuration rather than patching, and it has not changed:

Browsers responded by refusing Diffie-Hellman groups below 1,024 bits, which broke a visible number of badly configured sites and forced the issue. Modern scanners, including the Qualys SSL Labs test and testssl.sh, flag weak groups automatically, so this is easy to verify as part of routine vulnerability scanning.

The Wider Point

Logjam belongs to a family that includes POODLE, DROWN, and the ROBOT attack, all of which exploit obsolete options that were never removed. The practical lesson for anyone managing TLS is that a cipher suite list is a security control with a maintenance schedule, not a one-off setting, and that shared cryptographic parameters concentrate risk in a way individual key sizes do not suggest.

Our Network Security Services include protocol and cipher configuration review across web, mail, and VPN endpoints, which is where weak groups usually survive longest.

FAQ – Frequently Asked Questions

Is Logjam Still a Realistic Threat?

Against well-configured modern servers, no. Export cipher suites have been removed from every current TLS library, browsers reject groups under 1,024 bits, and TLS 1.3 eliminates custom Diffie-Hellman parameters altogether. The residual risk is in legacy VPN concentrators, mail servers, and embedded management interfaces that were configured years ago and never reviewed, which is exactly where scanners still find weak groups.

What Is the Difference Between Logjam and FREAK?

Both downgrade a connection to export-grade cryptography, but they target different key exchanges. FREAK forces the use of 512-bit export RSA and exploits a client-side state machine bug, whereas Logjam targets Diffie-Hellman and exploits the fact that the server chooses the group and the client cannot verify what was originally offered. Logjam also benefits from precomputation against widely shared primes.

Should We Use Diffie-Hellman or Elliptic Curve Key Exchange?

Elliptic curve, in almost all cases. ECDHE gives equivalent security to finite-field Diffie-Hellman at a fraction of the computational cost, uses standard named curves rather than server-chosen parameters, and avoids the precomputation weakness that makes shared primes dangerous. If finite-field groups are required for compatibility, use a unique group of at least 2,048 bits generated for your own environment.

How Do We Check Whether Our Servers Are Affected?

Run an external scan with the Qualys SSL Labs test for public web endpoints, and testssl.sh or sslyze for internal and non-HTTP services. Both report the offered cipher suites and the size of any Diffie-Hellman group. Remember to check mail servers, VPN gateways, and management interfaces as well as websites, since those are routinely excluded from web-focused assessments.

Related Terms

You May Be Interested In These

What Is a Shadow Credentials Attack?

Cybersecurity Terms

17 November 2026

What Is a Shadow Credentials Attack?

Read More
What Is System Hardening?

Cybersecurity Terms

17 November 2026

What Is System Hardening?

Read More
What Is a Biomedical Device Inventory?

Cybersecurity Terms

17 November 2026

What Is a Biomedical Device Inventory?

Read More