CVE-2017-16015: Cross-Site Scripting in forms

forms Updated 02 Oct 2025

Summary

09/11/2018
Yes i
Moderate
6.1

CVE-2017-16015: Cross-Site Scripting in forms. Affects forms versions < 1.3.0. Fixed in 1.3.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The 'forms' package is an npm package that provides functionality for generating HTML forms. It is commonly used in web development projects to simplify the process of creating and handling forms. However, versions of 'forms' prior to 1.3.0 are vulnerable to a cross-site scripting (XSS) attack. This vulnerability occurs because the package does not properly escape HTML in generated forms, allowing an attacker to inject malicious scripts into the rendered HTML.

Vulnerability Detail

The vulnerability in the 'forms' package allows an attacker to execute arbitrary JavaScript code in the context of a victim's browser. This can lead to various security issues, such as session hijacking, data theft, or defacement of the affected web application. The vulnerability is classified as CWE-80, which is the Common Weakness Enumeration identifier for Improper Neutralization of Script-Related HTML Tags in a Web Page (XSS).

How To Fix

Minimum fixed version

1.3.0

This is the first release that contains the fix.

npm install forms@1.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the 'forms' package is not immediately feasible, a temporary workaround is to manually sanitize the generated form HTML before rendering it in the browser. This can be done using a library or function that properly escapes HTML characters, such as 'htmlspecialchars' in PHP or 'DOMPurify' in JavaScript.

Conclusion

The 'forms' package prior to version 1.3.0 is vulnerable to cross-site scripting (XSS) attacks due to improper HTML escaping. To mitigate this vulnerability, it is recommended to update the package to version 1.3.0 or later. If immediate updating is not possible, manual HTML sanitization should be implemented. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for forms →

Share this vulnerability

FAQ

The vulnerability allows an attacker to execute arbitrary JavaScript code in the victim's browser, potentially leading to session hijacking, data theft, or defacement of the affected web application.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your package-lock.json file and the playground will analyze it for any open-source vulnerabilities, including this one.

While there may not be a specific known exploit for this vulnerability in the wild, it is important to address it promptly as XSS vulnerabilities are commonly targeted by attackers.

There have been reported incidents of XSS attacks in various web applications, some of which could be attributed to similar vulnerabilities. It is crucial to stay updated and apply necessary security patches to mitigate such risks.

If updating the 'forms' package is not immediately feasible, you should consider implementing a manual HTML sanitization process to ensure that any user-generated content is properly escaped before rendering it in the browser.

Related vulnerabilities

Recent vulnerabilities recorded for forms.

How To Fix

Minimum fixed version

1.3.0

This is the first release that contains the fix.

npm install forms@1.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback