# CVE-2017-15881: KeystoneJS cross-site scripting in blog posts

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

CVE-2017-15881 · Severity: low · CVSS 3.1 · Published 2017-11-16

KeystoneJS is an open-source Node.js CMS and content management framework. A cross-site scripting (XSS) vulnerability in versions prior to 4.0.0 allows attackers with administrative access to inject malicious JavaScript into blog posts that executes in the browsers of other users viewing those posts, potentially enabling session hijacking, credential theft, or defacement.

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

## Quick answers

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

**How severe is CVE-2017-15881?** Low severity, with a CVSS score of 3.1, published 16 November 2017.

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

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

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

**Am I affected by CVE-2017-15881?** 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-beta7 or later

  ```sh
  npm install keystone@4.0.0-beta7
  ```


## Technical details

KeystoneJS fails to properly encode rendered HTML in admin-created blog posts, resulting in a stored cross-site scripting (XSS) vulnerability (CWE-79). An attacker with administrative privileges can inject arbitrary JavaScript into blog post content. When other users view the compromised blog post, the malicious script executes in their browser with the privileges of their session. The attack requires admin-level account access and user interaction (victims must view the infected post). The vulnerability was fixed in version 4.0.0-beta7 and later.

## Affected products

- KeystoneJS keystone < 4.0.0

## Identifiers

- CVE-2017-15881
- GHSA-7cv6-gvx3-m54m

## Timeline

- 2017-11-16: disclosed
- 2017: patched: Fixed in version 4.0.0-beta7

## References

- [https://github.com/keystonejs/keystone/issues/4437](https://github.com/keystonejs/keystone/issues/4437)

## 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 CSV injection in export](https://junglewise.ai/threats/cve-2017-15879-keystonejs-csv-injection-in-export)
- [KeystoneJS Cross-Site Scripting in contact form](https://junglewise.ai/threats/cve-2017-15878-keystonejs-cross-site-scripting-in-contact-form)
