Skip to content
DoS Write-up Beginner

One File, Zero Clicks Needed: A Stored DoS Story

A diagramming tool accepted SVG shape libraries whose XML entity expansion caused the parser to expand a tiny file into an enormous amount of work, hanging the diagram indefinitely. A low-privilege collaborator could plant such a file so that any user, including the owner, who opened the diagram would be stuck loading.

devyanipardesh7010 Follow

Published on medium.com

Bug Bounty

Devyani Pardeshi, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This is the story of a first bug bounty finding against a diagramming tool. The product lets users build diagrams and, as part of that, upload custom shape libraries as SVG files. In normal use an SVG shape library is just a small file of vector shapes that the tool parses and makes available in the diagram editor, so a user can drag a custom shape onto the canvas.

The researcher's point is that an SVG is XML underneath, and XML parsers can be asked to expand entities. That gives the classic entity expansion problem nicknamed the "Billion Laughs" attack. The report does not name the vendor, the program, or any endpoint, parameter or version.

Setup

Two accounts were used:

  1. A low-privilege collaborator with basic edit access to a diagram.
  2. A high-privilege owner of the same diagram.

The only tooling described is the diagramming tool itself and its custom shape library upload. No proxy, scanner or version information is given.

Finding it

The researcher uploaded an SVG shape library containing an XML entity expansion payload, saved the diagram, and then watched the page. It kept loading: one minute, five minutes, an hour, still loading. The file was not trying to steal credentials; it was asking the server to do an impossible amount of work. A few hundred bytes of XML were being expanded by the parser into something enormous, and the backend was exhausted.

The endless loading, still going after an hour, is what made it click as interesting.

Exploitation

Step 1: upload the SVG as a custom shape library

The collaborator account uploaded the crafted SVG into the diagram's custom shape library. The report does not reproduce the file contents, so the exact payload is not available here.

Step 2: drag the shape onto the canvas

The collaborator dragged the uploaded shape onto the canvas. The diagram would not load. This was the expected result for the account that had planted the file.

Step 3: open the same diagram as the owner

The researcher logged back in as the owner, an account that had never touched the malicious file, and opened the same diagram. It was also stuck, also spinning.

This is the step that showed the bug was stored rather than limited to the uploader's own session. The payload was not breaking the uploader's own session; it was stored in the diagram, so any user who opened that diagram would hang indefinitely without doing anything further. One low-privilege collaborator could plant it, and the owner was affected simply by viewing the diagram.

Root cause

The report attributes the behaviour to the SVG parser expanding XML entities, so a few hundred bytes of XML became an enormous amount of work. The file is small, but entity expansion makes the parser resolve an enormous amount of content, and the backend is left exhausted. The report's moral is that an SVG upload feature whose parser does not explicitly disable external entity resolution is a delivery mechanism for this kind of file. The report's own moral is that an SVG upload feature whose parser does not explicitly disable external entity resolution is a delivery mechanism for this kind of file. The report does not show the parser configuration or the server code, so the exact setting is likely rather than confirmed.

Impact

A low-privilege collaborator with basic edit access can store a file that makes the diagram hang for anyone who opens it, including the owner, indefinitely and with no further action from the attacker. The report's example is a team that relies on such diagrams for architecture documentation: the page stops loading, users blame their network and their machines, and IT spends time on it because nothing looks broken. The backend is simply stuck resolving a file that looks like a boring little icon.

Nothing was hacked in the data-theft sense; the impact described is availability.

Fix

The report says the issue was triaged, the researcher followed up once, and a fix is in progress. The control the report argues for is that an application accepting SVG uploads should have its parser explicitly refuse to resolve entities, so that entity expansion cannot be triggered by an uploaded file.

Variants to test

  1. Upload an SVG shape library containing an entity expansion payload and open the diagram in a second account that never touched the file. A positive result is the diagram hanging for the second account, which shows the payload is stored rather than session-local.
  2. Try the same file through other SVG-accepting features, such as icons, avatars or document previews. A positive result is the same endless loading in a feature that parses the file server-side.
  3. Check whether the hang is bounded. If the page eventually recovers after a long delay, the parser is expanding entities but with some limit; if it never recovers, the limit is absent or too high.
  4. Test whether the effect spreads beyond the single diagram, for example by opening other diagrams or the dashboard while the malicious one is stuck. A positive result is a wider outage than one document.
  5. Try the payload from an account with the lowest possible role, to establish the minimum privilege needed. A positive result is a viewer or commenter role being able to store the file.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

A security researcher found a bug in a diagramming tool, a website where people draw boxes, arrows and flowcharts together, a bit like an online whiteboard. The tool let people upload their own sets of shapes, saved as files in a format called SVG. She uploaded one tiny file that was built to make the server work forever, and the diagram stopped loading. The important part: when a different person, the owner of the diagram, opened the same diagram, it also stopped loading for them. So one small file, planted by someone with only basic editing rights, could freeze the diagram for everyone who opened it. She reported it, it was triaged, a fix is in progress, and she was paid a $300 bounty. This was her first bug.

This article walks through the whole story slowly, explaining each idea as it appears. You only need to know how to use a browser.

The background: what a bug bounty is

A bug bounty is a deal between a company and outside researchers. The company says: if you find a security problem in our product and tell us privately, we will pay you, depending on how serious it is. The researcher does not break in to steal things; they look for weaknesses and report them responsibly.

A bug bounty program is the organised version of that deal: a page listing which products are in scope, what rules apply, and roughly what pays what.

Before this story, the researcher had tried bug hunting several times and kept getting the same replies:

  • Informative: the company read the report but decided it was not a real security issue, just interesting information.
  • Duplicate: someone else had already reported the same thing, so no reward.
  • NA: not applicable, meaning the report did not fit the program's rules.

She got frustrated and took a break. Then she came back with no expectations. That matters for the story: the finding came from patience, not from a fancy toolkit.

The feature: custom shape libraries

A diagramming tool is software for drawing diagrams: org charts, architecture pictures, flowcharts. You drag shapes onto a canvas, which is the drawing area, and connect them.

This tool had a feature called custom shape libraries. Normally the tool gives you a set of built-in shapes. A custom library lets you upload your own set of shapes so they appear in the editor and you can drag them onto the canvas.

The upload format was SVG. SVG stands for Scalable Vector Graphics. It is a way of describing a picture with text: instead of storing pixels, it stores instructions like "draw a circle here, a line there". Because it is text, it stays sharp at any size, which is why icons and logos often use it.

Here is the key fact: an SVG file is really an XML file. XML is a text format for structured data, where things are wrapped in tags like <shape>...</shape>. Think of XML as a set of labelled boxes inside boxes. A browser or a server reads those tags and understands the structure.

Because SVG is XML, the tool's server has to run an XML parser on every uploaded SVG. A parser is a program that reads a structured file and turns the text into something the software can use. Think of it as a clerk who opens a parcel, reads the packing list, and lays the contents out on a table.

The trick: entity expansion and "Billion Laughs"

XML has a feature called entities. An entity is a shortcut: you define a short name that stands for a piece of text, then use the short name wherever you want that text. It is like writing "HQ" on a note and agreeing that HQ means "the head office building on the third floor".

Entities can refer to other entities. That is where the trouble starts. If entity A contains ten copies of entity B, and entity B contains ten copies of entity C, and so on, the parser has to expand all of them to work out the final text. Each level multiplies the work.

This is the classic entity expansion attack, nicknamed "Billion Laughs". The name comes from an old joke file that defined entities containing the word "lol" and nested them so that a tiny file expanded into gigabytes of text. The file is small on disk; the expanded result is enormous.

A denial of service (DoS) attack means making a service unavailable rather than stealing data. It is the difference between someone picking your lock and someone jamming the door so nobody can get in. Nothing is taken; the service just cannot do its job.

Stored means the harmful thing is saved on the server and affects other people later, not just the person who planted it. A stored attack is more serious than one that only affects the attacker's own browser session, because it reaches other users.

Finding it

The researcher uploaded an SVG shape library containing an XML entity expansion payload, saved the diagram, and watched the page. A payload here just means the contents of the file that do the damage.

What she saw:

  1. One minute: still loading.
  2. Five minutes: still loading.
  3. One hour: still loading.

A page that never finishes loading, instead of showing an error, is a signal. Errors mean the software noticed something wrong. Endless loading often means the server is busy doing work and has not got to answering yet.

That is when it clicked: this was interesting.

What was actually happening

The file was not malicious in the "steals your password" sense. It was malicious in the "asks the server to do an impossible amount of work and never stops" sense. A few hundred bytes of XML were being expanded by the parser into something enormous, and the backend was exhausted.

The backend is the part of a website you never see: the server and the programs running on it that store data and do the work. Your browser is the frontend, the part you see and click. When you open a diagram, your browser asks the backend for it, and the backend does the processing.

So the picture is: a tiny file goes in, the parser tries to expand it into a huge amount of text, and the server is stuck doing that work. Nothing was hacked. The backend was just exhausted.

Then it got worse, in a good way for the report

To prove the bug was serious, the researcher set up two accounts:

  1. A low-privilege collaborator with basic edit access to a diagram. "Low privilege" means this account has limited rights: it can edit, but it is not an administrator and does not own the diagram.
  2. A high-privilege owner of the same diagram. The owner is the account that created or controls the diagram and has full rights over it.

This two-account setup is a standard way to test whether a problem is stored. If the second account, which never touched the file, is also affected, the harmful thing must be saved on the server, not just in the first account's browser.

Step 1: upload the SVG as a custom shape library

The collaborator account uploaded the crafted SVG into the diagram's custom shape library. The report does not reproduce the file contents, so the exact payload is not shown here.

Why this step: the upload is the entry point. If the server parses the file when it is uploaded or when the diagram is opened, this is where the work gets triggered.

Step 2: drag the shape onto the canvas

The collaborator dragged the uploaded shape onto the canvas. The diagram would not load. This was the expected result for the account that had planted the file.

Step 3: open the same diagram as the owner

The researcher logged back in as the owner, an account that had never touched the malicious file, and opened the same diagram. It was also stuck, also spinning.

This is the step that showed the bug was stored rather than limited to the uploader's own session. The payload was not breaking the uploader's own session; it was stored in the diagram, so any user who opened that diagram would hang indefinitely without doing anything further. One low-privilege collaborator could plant it, and the owner was affected simply by viewing the diagram.

A session is the period you are logged in, and the browser holds a session cookie or token to prove who you are. A cookie is a small piece of data the site stores in your browser; a token is similar, a string that acts like a temporary ID card. If a bug only breaks your own session, it is much less serious, because it does not reach other people. A stored bug survives that and hits other people.

Why it actually matters

Imagine a team that relies on these diagrams for architecture docs. One day the page will not load. People blame their wifi, then their laptop, then eventually file a ticket, and IT spends an afternoon confused, because nothing looks "broken". The backend is just stuck, forever, resolving a file that looks like a boring little icon.

This is the impact: the effect on real users. Here the impact is on availability, meaning whether the service works at all, rather than on confidentiality (secrets staying secret) or integrity (data staying correct). Nothing was stolen or changed; the diagram simply would not open.

The report does not state how many diagrams or users were affected, or whether the hang was limited to the diagram or extended to the wider service.

The payoff

She reported it. It got triaged, meaning the company's security team reviewed it and confirmed it was a real issue worth working on. She followed up once, and a fix is now in progress. She walked away with her first paid bounty: $300, for a file that is basically angry XML throwing a tantrum.

The report does not describe what the fix changes.

The moral

If your app lets people upload SVGs and the parser does not explicitly disable external entity resolution, you do not have an image upload feature; you have a Trojan horse delivery service with extra steps.

External entity resolution is when the parser follows an entity that points outside the file, for example to another file on the server or a web address. Disabling it means the parser refuses to follow those references. The report's moral is that the parser should explicitly disable external entity resolution.

And if you have tried bug hunting a few times and all you have got back is "Informative" and "Duplicate", do not quit. Sometimes all it takes is one oddly named XML bomb and a lot of stubbornness.

Variants to test

These are follow-up tests in the same spirit, for anyone who wants to check similar features:

  1. Upload an SVG shape library containing an entity expansion payload and open the diagram in a second account that never touched the file. A positive result is the diagram hanging for the second account, which shows the payload is stored rather than session-local.
  2. Try the same file through other SVG-accepting features, such as icons, avatars or document previews. A positive result is the same endless loading in a feature that parses the file server-side.
  3. Check whether the hang is bounded. If the page eventually recovers after a long delay, the parser is expanding entities but with some limit; if it never recovers, the limit is absent or too high.
  4. Test whether the effect spreads beyond the single diagram, for example by opening other diagrams or the dashboard while the malicious one is stuck. A positive result is a wider outage than one document.
  5. Try the payload from an account with the lowest possible role, to establish the minimum privilege needed. A positive result is a viewer or commenter role being able to store the file.

Glossary

  • Backend: the server-side part of a website that stores data and does the processing; you never see it directly.
  • Billion Laughs: the nickname for an XML entity expansion attack where nested entities multiply a tiny file into an enormous amount of text.
  • Bug bounty: a scheme where a company pays outside researchers for reporting security problems privately.
  • Bug bounty program: the organised page and rules for a company's bug bounty, listing scope and rewards.
  • Canvas: the drawing area in a diagramming tool where shapes are placed.
  • Cookie: a small piece of data a website stores in your browser, often used to keep you logged in.
  • Custom shape library: a user-uploaded set of shapes that a diagramming tool adds to its editor.
  • Denial of service (DoS): making a service unavailable rather than stealing data.
  • Diagramming tool: software for drawing diagrams such as flowcharts and architecture pictures.
  • Duplicate: a bug report reply meaning someone else already reported the same issue.
  • Entity: an XML shortcut where a short name stands for a piece of text, which the parser expands.
  • Entity expansion: the parser replacing entity names with their full text, which can multiply work enormously when entities are nested.
  • External entity resolution: a parser following an entity that points outside the file, such as another file or a web address.
  • Frontend: the part of a website you see and interact with in your browser.
  • High privilege: an account with full rights, such as the owner of a diagram.
  • Impact: the real-world effect of a bug on users and the service.
  • Informative: a bug report reply meaning the company read it but judged it not a security issue.
  • Low privilege: an account with limited rights, such as basic edit access without ownership.
  • NA: not applicable; a report reply meaning the report did not fit the program's rules.
  • Parser: a program that reads a structured file and turns its text into something the software can use.
  • Payload: the contents of a file or request that carry out the attack.
  • Session: the period you are logged in to a site, tracked by a cookie or token.
  • Stored: a harmful thing saved on the server that affects other users later, not just the person who planted it.
  • SVG: Scalable Vector Graphics, a text-based image format that describes shapes rather than pixels.
  • Token: a string that acts like a temporary ID card, used to prove who you are to a site.
  • Triaged: reviewed and confirmed by a company's security team as a real issue.
  • XML: a text format for structured data, where content is wrapped in tags.
  • XML bomb: a small XML file crafted to expand into an enormous amount of work when parsed.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.