CVE-2018-14041: Bootstrap Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-pj7m-g53m-7638
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2018-14041 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Bootstrap libraries in the npm ecosystem. The issue involves bootstrap cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 4.1.2, 8.7.23, 9.5.4.

CVE-2018-14041 at a Glance

CVE Identifier CVE-2018-14041
GHSA Identifier GHSA-pj7m-g53m-7638
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Bootstrap
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2018-14041

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

bootstrap fixed: 4.1.2
npm install bootstrap@4.1.2
typo3/cms-core fixed: 8.7.23
Upgrade typo3/cms-core to 8.7.23
typo3/cms-core fixed: 9.5.4
Upgrade typo3/cms-core to 9.5.4
typo3/cms fixed: 8.7.23
Upgrade typo3/cms to 8.7.23
typo3/cms fixed: 9.5.4
Upgrade typo3/cms to 9.5.4
bootstrap fixed: 4.1.2
Upgrade bootstrap to 4.1.2
twbs/bootstrap fixed: 4.1.2
Upgrade twbs/bootstrap to 4.1.2
bootstrap fixed: 4.1.2
Upgrade bootstrap to 4.1.2
bootstrap.sass fixed: 4.1.2
Upgrade bootstrap.sass to 4.1.2
org.webjars:bootstrap fixed: 4.1.2
<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>bootstrap</artifactId>
    <version>4.1.2</version>
</dependency>
Verify Direct and Transitive Dependencies

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

npm ls bootstrap

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2018-14041, inspect your project dependencies using npm:

npm ls bootstrap

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

Note: The npm ls bootstrap command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Bootstrap, 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

In Bootstrap 4.x before 4.1.2, XSS is possible in the data-target property of scrollspy. This is similar to CVE-2018-14042.

CVE-2018-14041 Affected Bootstrap Versions

10 component(s)
Fixed Versions:
4.1.28.7.239.5.4
Product / Package Ecosystem Affected Versions Fixed Version
bootstrap
npm
≥ 4.0.0
< 4.1.2
4.1.2
typo3/cms-core
Packagist
≥ 8.0.0
< 8.7.23
8.7.23
typo3/cms-core
Packagist
≥ 9.0.0
< 9.5.4
9.5.4
typo3/cms
Packagist
≥ 8.0.0
< 8.7.23
8.7.23
typo3/cms
Packagist
≥ 9.0.0
< 9.5.4
9.5.4
bootstrap
RubyGems
≥ 4.0.0
< 4.1.2
4.1.2
twbs/bootstrap
Packagist
≥ 4.0.0
< 4.1.2
4.1.2
bootstrap
NuGet
≥ 4.0.0
< 4.1.2
4.1.2
bootstrap.sass
NuGet
≥ 4.0.0
< 4.1.2
4.1.2
org.webjars:bootstrap
Maven
≥ 4.0.0
< 4.1.2
4.1.2

References

NVD — CVE-2018-14041 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-14041
Bootstrap Source Repository REPOSITORY
https://github.com/twbs/bootstrap/issues/26423
Bootstrap Source Repository REPOSITORY
https://github.com/twbs/bootstrap/issues/26627
Bootstrap Source Repository REPOSITORY
https://github.com/twbs/bootstrap/pull/26630
Bootstrap Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
Bootstrap Security Information SECURITY
https://typo3.org/security/advisory/typo3-core-sa-2019-006
seclists.org/bugtraq/2019/may/18 WEB
https://seclists.org/bugtraq/2019/May/18
lists.apache.org/thread.html/r3dc0ca... WEB
https://lists.apache.org/thread.html/r3dc0cac8d856bca02bd6997355d7ff83027dcfc82f8646a29b89b714@%3Cissues.hbase.apache.org%3E
lists.apache.org/thread.html/f9bc3e5... WEB
https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E
lists.apache.org/thread.html/b0656d3... WEB
https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/52e0e6b... WEB
https://lists.apache.org/thread.html/52e0e6b5df827ee7f1e68f7cc3babe61af3b2160f5d74a85469b7b0e@%3Cdev.superset.apache.org%3E
lists.apache.org/thread.html/519eb0f... WEB
https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E
Bootstrap Source Repository REPOSITORY
https://github.com/twbs/bootstrap
Bootstrap Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bootstrap/CVE-2018-14041.yml
Bootstrap Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms/CVE-2018-14041.yaml
Bootstrap Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms-core/CVE-2018-14041.yaml
Bootstrap Security Information SECURITY
https://blog.getbootstrap.com/2018/07/12/bootstrap-4-1-2
access.redhat.com/errata/rhsa-2019:14... WEB
https://access.redhat.com/errata/RHSA-2019:1456
Bootstrap Security Information SECURITY
http://packetstormsecurity.com/files/152787/dotCMS-5.1.1-Vulnerable-Dependencies.html
Bootstrap Security Information SECURITY
http://packetstormsecurity.com/files/156743/OctoberCMS-Insecure-Dependencies.html
seclists.org/fulldisclosure/2019... WEB
http://seclists.org/fulldisclosure/2019/May/10
seclists.org/fulldisclosure/2019... WEB
http://seclists.org/fulldisclosure/2019/May/11
seclists.org/fulldisclosure/2019... WEB
http://seclists.org/fulldisclosure/2019/May/13

Frequently Asked Questions

What is CVE-2018-14041?
CVE-2018-14041 is a security vulnerability in Bootstrap involving Bootstrap Cross-site Scripting vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Bootstrap versions are affected?
Affected versions include releases prior to 4.1.2, 8.7.23, 9.5.4 across affected packages: bootstrap, typo3/cms-core, typo3/cms, twbs/bootstrap, bootstrap.sass, org.webjars:bootstrap.
What version fixes CVE-2018-14041?
Upgrading to 4.1.2, 8.7.23, 9.5.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bootstrap affected?
Yes, bootstrap is affected in releases prior to 4.1.2. Upgrade your dependency to 4.1.2 or later.
Is typo3/cms-core affected?
Yes, typo3/cms-core is affected in releases prior to 8.7.23, 9.5.4. Upgrade your dependency to 8.7.23, 9.5.4 or later.
What is the CVSS score of CVE-2018-14041?
CVE-2018-14041 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2018-14041?
CVE-2018-14041 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2018-14041?
Run the dependency tree command: 'npm ls bootstrap'. 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-pj7m-g53m-7638",
  "modified" : "2025-11-19T14:25:32Z",
  "published" : "2018-09-13T15:49:56Z",
  "aliases" : [ "CVE-2018-14041" ],
  "summary" : "Bootstrap Cross-site Scripting vulnerability",
  "details" : "In Bootstrap 4.x before 4.1.2, XSS is possible in the data-target property of scrollspy. This is similar to CVE-2018-14042.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bootstrap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "typo3/cms-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.7.23"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "typo3/cms-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.5.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "typo3/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.7.23"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "typo3/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.5.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "bootstrap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "twbs/bootstrap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "bootstrap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "bootstrap.sass"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.webjars:bootstrap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-14041"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/twbs/bootstrap/issues/26423"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/twbs/bootstrap/issues/26627"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/twbs/bootstrap/pull/26630"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://typo3.org/security/advisory/typo3-core-sa-2019-006"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/bugtraq/2019/May/18"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r3dc0cac8d856bca02bd6997355d7ff83027dcfc82f8646a29b89b714@%3Cissues.hbase.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/52e0e6b5df827ee7f1e68f7cc3babe61af3b2160f5d74a85469b7b0e@%3Cdev.superset.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/twbs/bootstrap"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bootstrap/CVE-2018-14041.yml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms/CVE-2018-14041.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms-core/CVE-2018-14041.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://blog.getbootstrap.com/2018/07/12/bootstrap-4-1-2"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:1456"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/152787/dotCMS-5.1.1-Vulnerable-Dependencies.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/156743/OctoberCMS-Insecure-Dependencies.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2019/May/10"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2019/May/11"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2019/May/13"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:49:18Z",
    "nvd_published_at" : "2018-07-13T14:29:00Z"
  }
}