# CVE-2018-3748: glance Stored Cross-Site Scripting in filename

Source: https://junglewise.ai/threats/cve-2018-3748-glance-stored-cross-site-scripting-in-filename  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-09-27. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2018-3748 · Severity: low · CVSS 3 · Published 2018-09-27

glance is a JavaScript library used to serve and display files. A Stored XSS vulnerability in filename handling allows an attacker who can control file names to inject malicious scripts that execute in the browsers of users viewing those files. This could lead to session hijacking, credential theft, or malware distribution to end users.

Technologies: [glance (npm)](https://junglewise.ai/threats/technologies/glance). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2018-3748 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2018-3748 being exploited in the wild.

**How severe is CVE-2018-3748?** Low severity, with a CVSS score of 3, published 27 September 2018.

**Which products and versions are affected?** glance (npm) SEMVER:introduced=0,fixed=3.0.8.

**Is there a fix for CVE-2018-3748?** Yes. glance (npm): upgrade to 3.0.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2018-3748 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2018-3748?** Check whether you run glance (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- glance (npm): upgrade to 3.0.8 or later

  ```sh
  npm install glance@3.0.8
  ```


## Technical details

The vulnerability is a Stored Cross-Site Scripting (XSS) flaw in glance versions before 3.0.8, specifically in how the library handles filenames when serving files. The root cause is improper sanitization or encoding of file names before they are rendered in HTML responses. An attacker who can control or influence the names of files served by the glance package can inject malicious JavaScript payloads into filenames; these payloads are then executed in the browsers of users who access or view those files. The attack requires the attacker to have upload or filesystem access to place files with XSS payloads in their names. The vulnerability was fixed in version 3.0.8.

## Affected products

- jarofghosts glance before 3.0.8

## Identifiers

- CVE-2018-3748
- GHSA-7375-vjr2-3g7w

## Timeline

- 2018-09-27: disclosed
- 2018: patched: fixed in version 3.0.8

## References

- [https://github.com/jarofghosts/glance/commit/cdc68bb68d785343ddb829f1adc130cdd6169533](https://github.com/jarofghosts/glance/commit/cdc68bb68d785343ddb829f1adc130cdd6169533)

## Related threats

- [jarofghosts glance path traversal in static file server](https://junglewise.ai/threats/cve-2022-25937-jarofghosts-glance-path-traversal-in-static-file-server)
- [Glance unauthorized file access via dotfile directory traversal](https://junglewise.ai/threats/glance-unauthorized-file-access-via-dotfile-directory-traversal-bbde57d4)
- [jarofghosts glance path traversal](https://junglewise.ai/threats/cve-2018-3715-jarofghosts-glance-path-traversal)
