Skip to main content
  1. Home
  2. Computing
  3. Web
  4. Legacy Archives

How the Heartbleed bug works, as explained by a Web comic

Add as a preferred source on Google

Sometimes, the easiest way to explain a concept to someone is with the use of illustrations, or cartoons. Xkcd.com attempts to do just that with this simple comic, where it tells a short story of a hacker talking to a server, who uses the Heartbleed exploit to trick the server into leaking more information it’s supposed to, until it begins to divulges sensitive data.

First, check the comic out below.

heartbleed_explanation
Image used with permission by copyright holder

First the girl asks the server to indicate whether it’s still online by telling it to say “Potato,” and indicates the length of the word. The server responds with “Potato,” while withholding all of the information surrounding “Potato,” written out in a lighter hue in the server’s speech bubbles. The hacker then asks the server to repeat the same task, but instead replaces “Potato” with “Bird,” and indicates the length of the word. The server complies.

Recommended Videos

Then, the hacker asks the server to say “Hat,” but instead of noting that it’s a three-character word, she states that it’s 500 letters long. The server responds not only by saying “Hat,” but also by leaking out the information around the word. By doing so, it reveals sensitive server information, including a “master key,” which the hacker begins to jot down.

This is a basic explanation of how the Heartbleed bug works. The Heartbleed bug is a flaw in the OpenSSL method of data encryption used by many of the world’s websites, which was actually put into the code accidentally by a programmer roughly two years ago.

OpenSSL contains a function known as a heartbeat option. With it, while a person is visiting a website that encrypts data using OpenSSL, his computer periodically sends and receives messages to check whether both his PC and the server on the other end are both still connected. The Heartbleed bug allows hackers to send trick heartbeat messages, like the one pictured in the comic above, which can fool a site’s server into relaying data that’s stored in its RAM — including sensitive information such as usernames, passwords, credit card numbers, emails, and more. This is the part of the flaw that the Xkcd comic illustrates.

What do you think? Sound off in the comments below.

Konrad Krawczyk
Former Computing Editor
Konrad covers desktops, laptops, tablets, sports tech and subjects in between for Digital Trends. Prior to joining DT, he…
Microsoft has begun rolling out Copilot Code for building apps with natural language
The workplace-focused vibe coding tool can pull context from emails, documents, meetings, and chats.
Microsoft Copilot code logo

Microsoft introduced Code last month as one of the three core parts of its revamped Copilot app. The app was pitched as an easy-to-use coding agent that lets users describe what they want to build in natural language, like an app, a tracker, a dashboard, an automation, or a workflow, and Copilot would build it for them.

Essentially, it's a workplace-focused vibe-coding app that turns existing work into a functional app, and Microsoft has begun rolling it out through the Frontier program.

Read more
AI agents are acting like rogues and causing a huge headache for US banks
US banks block AI agents over fears they could make unauthorised financial moves
Banking

US banks are facing a new kind of digital headache: artificial intelligence agents attempting to access customer accounts and perform actions that may go beyond what users intended. As AI tools become more capable of navigating websites and carrying out tasks independently, financial institutions are scrambling to prevent them from crossing security boundaries.

According to a report published by Axios on October 22, major US banks have detected third-party AI agents operating inside customer accounts without authorisation. Some agents reportedly appeared to attempt actions independently of user instructions. The banks involved have not publicly detailed every incident, and there is no evidence that the reported activity resulted in widespread theft of customer funds.

Read more
Canva enters the AI image generation race with Craft, and it’s thinking beyond pretty pictures
The new model plans layouts before generating images, with precise editing and support for 30 aspect ratios.
Canva Craft Featured Image

AI can generate all kinds of pretty pictures, but getting it to spell a headline correctly or keep a poster's layout intact can be another story. Canva wants to fix that with Canva Craft, its first in-house image generation model. Rather than focusing primarily on photographs, Craft is designed around the posters, presentations, social media graphics, and other visual content people actually create. The goal is simple: spend less time fixing AI's mistakes and more time making something useful.

Canva Craft plans before it generates

Read more