Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

svgo

Latest version: v4.1.0

Overview

Last scanned
24 Aug 2026
Published
24 Aug 2026
npm package Publisher: deepsweet, greli, sethiii, trysound
22,650 Stars
1,461 Forks
2 Versions
148.7M Downloads
JavaScript Repo language

Scan summary

svgo was last scanned on 24 Aug 2026 at version 4.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 24 Aug 2026.
  • Findings: No rules fired in version 4.1.0.
  • Downloads: 148,740,167 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
4.1.0 LATEST 24 Aug 2026 No rules fired
2.8.4 24 Aug 2026 No rules fired

No rules fired in 4.1.0

Findings

Findings for v4.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 4.1.0; other versions have their own rules, not their own score.

Known vulnerabilities

4 CVEs · last 1 Sep 2026

0 CRITICAL 3 HIGH 1 MEDIUM 0 LOW

Versions

  • ≥ 4.1.0
  • ≥ 4.0.2, < 4.1.0 1 HIGH 1 MEDIUM
  • ≥ 4.0.1, < 4.0.2 2 HIGH 1 MEDIUM
  • ≥ 4.0.0, < 4.0.1 3 HIGH 1 MEDIUM
  • ≥ 3.3.5, < 4.0.0
  • ≥ 3.3.4, < 3.3.5 1 HIGH 1 MEDIUM
  • ≥ 3.3.3, < 3.3.4 2 HIGH 1 MEDIUM
  • ≥ 3.0.0, < 3.3.3 3 HIGH 1 MEDIUM
  • ≥ 2.8.4, < 3.0.0
  • ≥ 2.8.3, < 2.8.4 1 HIGH 1 MEDIUM
Show all 14 version ranges
  • ≥ 2.8.1, < 2.8.3 2 HIGH 1 MEDIUM
  • ≥ 2.1.0, < 2.8.1 3 HIGH 1 MEDIUM
  • ≥ 1.0.0, < 2.1.0 2 HIGH 1 MEDIUM
  • < 1.0.0

Vulnerabilities

  • CVE-2026-84370 High 1 Sep 2026 svgo: SVGO: Arbitrary script execution via incomplete executable link filtering Fixed in 2.8.4, 3.3.5, 4.1.0
  • CVE-2026-84369 Medium 1 Sep 2026 svgo: SVGO: Cross-Site Scripting (XSS) vulnerability in SVG foreignObject processing Fixed in 2.8.4, 3.3.5, 4.1.0
  • CVE-2026-73650 High 13 Aug 2026 SVGO, short for SVG Optimizer, is a Node.js library and command-line a ... Fixed in 2.8.3, 3.3.4, 4.0.2
  • CVE-2026-29074 High 6 Mar 2026 svgo: SVGO: Denial of Service via XML entity expansion Fixed in 2.8.1, 3.3.3, 4.0.1

Seal Security (npm)

Seal Security ships a patched build of this package. Its fixed versions:

  • CVE-2026-73650: 3.3.2-sp999, 4.0.0-sp999
  • CVE-2026-84369: 1.3.2-sp2, 2.8.2-sp2, 3.3.2-sp999, 3.3.3-sp2, 4.0.0-sp999
  • CVE-2026-84370: 1.3.2-sp2, 2.8.2-sp2, 3.3.2-sp999, 3.3.3-sp2, 4.0.0-sp999

README

The publisher’s own README, as collected from the registry.

SVGO npm chat docs

SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files.

Why?

SVG files, especially those exported from vector editors, usually contain a lot of redundant information. This includes editor metadata, comments, hidden elements, default or suboptimal values, and other stuff that can be safely removed or converted without impacting rendering.

Installation

You can install SVGO globally through npm, yarn, or pnpm. Alternatively, drop the global flag (global/-g) to use it in your Node.js project.

# npm
npm install -g svgo

# yarn
yarn global add svgo

# pnpm
pnpm add -g svgo

Command-line usage

Process single files:

svgo one.svg two.svg -o one.min.svg two.min.svg

Process a directory of files recursively with -r/--recursive and -f/--folder:

svgo -rf path/to/directory_with_svgs -o path/to/output_directory

Help for advanced usage:

svgo --help

Configuration

SVGO has a plugin architecture. You can read more about all plugins in Plugins | SVGO Documentation, and the default plugins in Preset Default | SVGO Documentation.

SVGO reads the configuration from svgo.config.mjs or the --config path/to/config.mjs command-line option. Some other parameters can be configured though command-line options too.

svgo.config.mjs

export default {
  multipass: false, // boolean
  datauri: 'base64', // 'base64'|'enc'|'unenc'
  js2svg: {
    indent: 4, // number
    pretty: false, // boolean
  },
  plugins: [
    'preset-default', // built-in plugins enabled by default
    'prefixIds', // enable built-in plugins by name

    // enable built-in plugins with an object to configure plugins
    {
      name: 'prefixIds',
      params: {
        prefix: 'uwu',
      },
    },
  ],
};
Default preset

Instead of configuring SVGO from scratch, you can tweak the default preset to suit your needs by configuring or disabling the respective plugin.

svgo.config.mjs

export default {
  plugins: [
    {
      name: 'preset-default',
      params: {
        overrides: {
          // disable a default plugin
          cleanupIds: false,

          // customize the params of a default plugin
          inlineStyles: {
            onlyMatchedOnce: false,
          },
        },
      },
    },
  ],
};

You can find a list of the default plugins in the order they run in Preset Default | SVGO Documentation.

Custom plugins

You can also specify custom plugins:

svgo.config.mjs

import importedPlugin from './imported-plugin';

export default {
  plugins: [
    // plugin imported from another JavaScript file
    importedPlugin,

    // plugin defined inline
    {
      name: 'customPlugin',
      params: {
        paramName: 'paramValue',
      },
      fn: (ast, params, info) => {},
    },
  ],
};

API usage

SVGO provides a few low level utilities.

optimize

The core of SVGO is optimize function.

import { optimize } from 'svgo';

const result = optimize(svgString, {
  path: 'path-to.svg', // recommended
  multipass: true, // all other config fields are available here
});

const optimizedSvgString = result.data;
loadConfig

If you write a tool on top of SVGO you may want to resolve the svgo.config.mjs file.

import { loadConfig } from 'svgo';

const config = await loadConfig();

You can also specify a path and customize the current working directory.

const config = await loadConfig(configFile, cwd);

Donors

SheetJS LLC Fontello

License and Copyright

This software is released under the terms of the MIT license.

Logo by André Castillo.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm svgo

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229