Vulnerabilities in pkg:gem/svg_optimizer

PACKAGE
Advisory Identifier: GHSA-6hvg-62q8-95v7
Advisory Summary

CVE-2023-46035 is a MODERATE svg_optimizer rubygem external xml entity vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Svg optimizer libraries in the RubyGems ecosystem. The issue involves svg_optimizer rubygem external xml entity (xxe) vulnerability. Remediation is available by upgrading affected packages to version 0.3.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/svg_optimizer

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/svg_optimizer. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6hvg-62q8-95v7 CVE-2023-46035 MODERATE svg_optimizer rubygem external XML entity (XXE) vulnerability

CVE-2023-46035 at a Glance

CVE Identifier CVE-2023-46035
GHSA Identifier GHSA-6hvg-62q8-95v7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Svg optimizer
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2023-46035

To remediate this vulnerability, upgrade all affected Svg optimizer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

svg_optimizer fixed: 0.3.0
Upgrade svg_optimizer to 0.3.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for svg_optimizer

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-46035, inspect your project dependencies for Svg optimizer:

inspect dependencies for svg_optimizer

Analyze the terminal output to locate any version of Svg optimizer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Svg optimizer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An issue in Fnando svg_optimizer v.0.2.6 allows a remote attacker to escalate privileges when optimizing untrusted SVG content.

CVE-2023-46035 Affected Svg optimizer Versions

1 component(s)
Fixed Versions:
0.3.0
Product / Package Ecosystem Affected Versions Fixed Version
svg_optimizer
RubyGems
≥ 0.2.6
< 0.3.0
All 1 versions
0.2.6
0.3.0

References

Frequently Asked Questions

What is CVE-2023-46035?
CVE-2023-46035 is a security vulnerability in Svg optimizer involving svg_optimizer rubygem external XML entity (XXE) vulnerability under CWE-611: Improper Restriction of XML External Entity Reference.
Which Svg optimizer versions are affected?
Affected versions include releases prior to 0.3.0 across affected packages: svg_optimizer.
What version fixes CVE-2023-46035?
Upgrading to 0.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is svg_optimizer affected?
Yes, svg_optimizer is affected in releases prior to 0.3.0. Upgrade your dependency to 0.3.0 or later.
What CWE is associated with CVE-2023-46035?
CVE-2023-46035 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check RubyGems dependencies for CVE-2023-46035?
Run the dependency tree command: 'inspect dependencies for svg_optimizer'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6hvg-62q8-95v7",
  "modified" : "2023-10-20T13:23:32Z",
  "published" : "2023-10-20T13:23:32Z",
  "aliases" : [ "CVE-2023-46035" ],
  "summary" : "svg_optimizer rubygem external XML entity (XXE) vulnerability",
  "details" : "An issue in Fnando svg_optimizer v.0.2.6 allows a remote attacker to escalate privileges when optimizing untrusted SVG content.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "svg_optimizer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.6"
      }, {
        "fixed" : "0.3.0"
      } ]
    } ],
    "versions" : [ "0.2.6" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fnando/svg_optimizer/pull/17"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fnando/svg_optimizer/commit/8244ff25b51a16892496e9d9f7191dba393f7af0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fnando/svg_optimizer/commit/b1b5013db297494daba5676b9fa4423ffc5e96fa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fnando/svg_optimizer"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/svg_optimizer/CVE-2023-46035.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-20T13:23:32Z",
    "nvd_published_at" : null
  }
}