# CVE-2017-15878: KeystoneJS Cross-Site Scripting in contact form

Source: https://junglewise.ai/threats/cve-2017-15878-keystonejs-cross-site-scripting-in-contact-form  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-11-15. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2017-15878 · Severity: low · CVSS 3 · Published 2017-11-15

KeystoneJS is a Node.js content management system and headless CMS platform. A flaw in the "Contact Us" page allows attackers to inject malicious JavaScript into contact form messages. When an administrator opens the inquiry in their browser, the attacker's script executes with the admin's privileges, potentially compromising account security or enabling unauthorized administrative actions.

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

## Quick answers

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

**How severe is CVE-2017-15878?** Low severity, with a CVSS score of 3, published 15 November 2017.

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

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

**How is CVE-2017-15878 attacked?** It is attacked over the network.

**Am I affected by CVE-2017-15878?** Check whether you run keystone (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

- keystone (npm): upgrade to 4.0.0 or later

  ```sh
  npm install keystone@4.0.0
  ```


## Technical details

The vulnerability is a stored Cross-Site Scripting (XSS) flaw (CWE-79) in KeystoneJS versions prior to 4.0.0. The Contact Us form fails to sanitize user input in the message field, and admin-facing output is not properly HTML-encoded. An unauthenticated attacker can submit a contact form with arbitrary JavaScript, which is stored and later executed when an administrator opens the inquiry in their browser. This requires user interaction (admin viewing the message) and affects the confidentiality and integrity of the application. The vulnerability was fixed in version 4.0.0.

## Affected products

- KeystoneJS keystone prior to 4.0.0

## Identifiers

- CVE-2017-15878
- GHSA-7qcx-jmrc-h2rr

## Timeline

- 2017-11-15: disclosed
- 2017: patched: Fixed in version 4.0.0

## References

- [https://github.com/keystonejs/keystone/pull/4478](https://github.com/keystonejs/keystone/pull/4478)

## Related threats

- [Keystone cross-site scripting](https://junglewise.ai/threats/keystone-cross-site-scripting-9990301e)
- [KeystoneJS keystone authentication weakness in email matching](https://junglewise.ai/threats/keystonejs-keystone-authentication-weakness-in-email-matching-6ecf46db)
- [Keystone Cross-Site Request Forgery (CSRF)](https://junglewise.ai/threats/cve-2017-16570-keystone-cross-site-request-forgery-csrf)
- [KeystoneJS cross-site scripting in blog posts](https://junglewise.ai/threats/cve-2017-15881-keystonejs-cross-site-scripting-in-blog-posts)
- [KeystoneJS CSV injection in export](https://junglewise.ai/threats/cve-2017-15879-keystonejs-csv-injection-in-export)
