Skip to content
Heist/ feed
Back to feed
MediumFix available

ruby-sanitize — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2023-23627

Sanitize is an allowlist-based HTML and CSS sanitizer. Versions 5.0.0 and later, prior to 6.0.1, are vulnerable to Cross-site Scripting. When Sanitize is configured with a custom allowlist that allows `noscript` elements, attackers are able to include arbitrary HTML, resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. The default configurations do not allow `noscript` elements and are not vulnerable. This issue only affects users who are using a custom config that adds `noscript` to the element allowlist. This issue has been patched in version 6.0.1. Users who are unable to upgrade can prevent this issue by using one of Sanitize's default configs or by ensuring that their custom config does not include `noscript` in the element allowlist.

Products
ruby-sanitize
Affected versions
Not specified
Fixed versions
6.0.0-1.1
CVEs
CVE-2023-23627
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 15:54 UTC · Revision 1

Source evidence

DEBIAN-CVE-2023-23627

core-osv · Original source

Published 28 Jan 2023, 00:15 UTC

Sanitize is an allowlist-based HTML and CSS sanitizer. Versions 5.0.0 and later, prior to 6.0.1, are vulnerable to Cross-site Scripting. When Sanitize is configured with a custom allowlist that allows `noscript` elements, attackers are able to include arbitrary HTML, resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. The default configurations do not allow `noscript` elements and are not vulnerable. This issue only affects users who are using a custom config that adds `noscript` to the element allowlist. This issue has been patched in version 6.0.1. Users who are unable to upgrade can prevent this issue by using one of Sanitize's default configs or by ensuring that their custom config does not include `noscript` in the element allowlist.

osv:DEBIAN-CVE-2023-23627

ruby-sanitize

Fixed versions: 6.0.0-1.1

ruby-sanitize

Fixed versions: 6.0.0-1.1

ruby-sanitize

Fixed versions: 6.0.0-1.1

Complete source record
{
  "id": "23719d4f6375fd7102a1c0669dfb8660cd6057038a7f2e49574d5b23059eb73d",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2023-23627",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2023-23627",
    "summary": "Sanitize is an allowlist-based HTML and CSS sanitizer. Versions 5.0.0 and later, prior to 6.0.1, are vulnerable to Cross-site Scripting. When Sanitize is configured with a custom allowlist that allows `noscript` elements, attackers are able to include arbitrary HTML, resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. The default configurations do not allow `noscript` elements and are not vulnerable. This issue only affects users who are using a custom config that adds `noscript` to the element allowlist. This issue has been patched in version 6.0.1. Users who are unable to upgrade can prevent this issue by using one of Sanitize's default configs or by ensuring that their custom config does not include `noscript` in the element allowlist.",
    "evidence": "osv:DEBIAN-CVE-2023-23627",
    "products": [
      {
        "name": {
          "value": "ruby-sanitize",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.0.0-1.1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ruby-sanitize",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.0.0-1.1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ruby-sanitize",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.0.0-1.1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2023-23627",
      "aliases": [
        "DEBIAN-CVE-2023-23627"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.0.0-1.1"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-sanitize",
            "purl": "pkg:deb/debian/ruby-sanitize?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-23627.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.0.0-1.1"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-sanitize",
            "purl": "pkg:deb/debian/ruby-sanitize?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-23627.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.0.0-1.1"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-sanitize",
            "purl": "pkg:deb/debian/ruby-sanitize?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-23627.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-26T18:02:24.073101790Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-23627"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2023-23627"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-23627",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 455997,
  "published_at": "2023-01-28T00:15:09.577+00:00"
}