Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2018-3740

A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-3740
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 10:30 UTC · Revision 1

Source evidence

CVE-2018-3740

core-osv · Original source

Published 30 Mar 2018, 19:29 UTC

A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.

osv:CVE-2018-3740
Complete source record
{
  "id": "badb605c45452f05e40040d8fa636532a96b24997809260f384f7a2c16c4f44a",
  "url": "https://osv.dev/vulnerability/CVE-2018-3740",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-3740",
    "summary": "A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.",
    "evidence": "osv:CVE-2018-3740",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2018-3740",
      "aliases": [
        "CVE-2018-3740",
        "GHSA-7f42-p84j-f58p"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/rgrove/sanitize",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "1cbdff38bf84939a8981c05fe4ba0dd7eec0ed6e"
                },
                {
                  "fixed": "01629a162e448a83d901456d0ba8b65f3b03d46e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "4.6.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "01629a162e448a83d901456d0ba8b65f3b03d46e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.6.0",
            "v4.5.0",
            "v4.4.0",
            "v4.3.0",
            "v4.2.0",
            "v4.1.0",
            "v4.0.1",
            "v4.0.0",
            "v3.1.2",
            "v3.1.1",
            "v3.1.0",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.0.6",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "release-2.0.2",
            "release-2.0.1",
            "release-2.0.0",
            "release-1.2.1",
            "release-1.2.0",
            "release-1.1.0",
            "release-1.0.4",
            "release-1.0.3",
            "release-1.0.2",
            "release-1.0.1",
            "release-1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-3740.json"
          }
        }
      ],
      "modified": "2026-10-20T10:50:27.807921225Z",
      "provider": "osv",
      "references": [
        "https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/",
        "https://www.debian.org/security/2018/dsa-4358",
        "https://github.com/rgrove/sanitize/issues/176",
        "https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46e"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2018-3740",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 381733,
  "published_at": "2018-03-30T19:29:00.27+00:00"
}