@perchance@lemmy.world

Potential SVG-Based Browser Denial of Service and Distribution of Malicious SVG

I'd like to bring a potentially serious issue to your attention involving the distribution of an SVG file via the comments plugin on
https://perchance.org/ai-text-to-image-generator The file in question appears capable of causing a browser tab to freeze or become unresponsive when opened. I investigated the file by downloading it for inspection.

File:(CAUTION) https://user.uploads.dev/file/d3eb67648f012789d884d2c9f3535f2f.svg

File size: Approximately 617 KB.

Technical findings

Despite its relatively small file size, the SVG contains a considerable amount of rendering complexity:

  • 25,364 rectangle elements.
  • 25,359 of those elements use the same filter.
  • Six filter definitions containing computationally expensive operations, including feTurbulence, feDisplacementMap, feMorphology, feGaussianBlur, and lighting effects.
  • Turbulence filters configured with up to 12 octaves.
  • Displacement scales reaching 4,000.
  • Gaussian blur values reaching 1,000.
  • 30 animation elements, including extremely short animation intervals.

This appears to exploit the difference between an SVG's file size and the amount of processing required to render it. A relatively small file can instruct the browser to perform an enormous amount of graphical processing.

My concern is that opening or previewing this file could consume enough system resources to hang a browser tab or potentially crash the browser.

Observed distribution

I reviewed approximately 5,000 recent messages and identified three instances where users posted the exact same SVG URL.

The associated message IDs and available account information are:

  1. PDWY-e537f725ccbf2962081d

    • No username or nickname.
  • Included an emoji and profanity alongside the link.
  1. K6TO-450b9edff09cfbe7915a

    • Username: thejonkler
    • Posted the bare SVG URL without additional text.
  2. MO3S-853378373d7ceafdd484

    • Username: laseir
    • Posted not to click the link, but included the actual URL in the warning. it resulted in more users clicking the link.

All three instances reference the same file.

It may be worth investigating the original upload and searching older message history for additional occurrences.

Why this concerns me

I'm not suggesting this necessarily represents a vulnerability in Perchance itself. However, if SVG files are rendered automatically when links are opened or previewed, a file like this could potentially be used to disrupt other users' browsing sessions.

It also raises questions about whether SVG complexity is restricted or whether the browser is effectively left to handle whatever rendering workload the file requests.

I thought this was worth bringing to your attention before the file, or similar files, are used more deliberately to disrupt other users. (the above message was written by two ai agents i used to help gather information.)

Thank you for taking a look.

  • Glass
you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 4 days ago* (last edited 4 days ago)

Seems the file already deleted 👍 🫡

  • source