CVE-2020-27851: Gravity Forms stored HTML injection vulnerability

wp-premium/gravityforms Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.4

CVE-2020-27851: Gravity Forms stored HTML injection vulnerability. Affects wp-premium/gravityforms versions < 2.4.21. Fixed in 2.4.21. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Gravity Forms is a popular WordPress plugin that allows users to create and manage forms on their websites. It provides a wide range of features, including the ability to create polls and quizzes. However, an additional paid add-on of Gravity Forms, specifically versions before 2.4.21, is vulnerable to stored HTML injection attacks in the poll and quiz features. This vulnerability allows remote attackers to inject arbitrary HTML code into poll or quiz answers. The injected code is then interpreted by users in privileged roles such as Administrators or Editors.

Vulnerability Detail

The stored HTML injection vulnerability in Gravity Forms add-on versions before 2.4.21 enables attackers to inject malicious HTML code into poll or quiz answers. This can lead to various security risks, including cross-site scripting (XSS) attacks. By injecting malicious code, an attacker can execute arbitrary scripts in the context of privileged users, potentially compromising the entire website. The vulnerability has a CVSS score of 5.4, indicating a moderate severity level.

How To Fix

Minimum fixed version

2.4.21

This is the first release that contains the fix.

composer require wp-premium/gravityforms:2.4.21

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

Workaround

As a temporary workaround, users can disable or remove the poll and quiz features in the affected Gravity Forms add-on. This can help mitigate the risk of stored HTML injection attacks until the add-on is updated to a secure version. However, this workaround may impact the functionality of forms that rely on these features.

Conclusion

The Gravity Forms stored HTML injection vulnerability in the poll and quiz features of the affected add-on versions before 2.4.21 poses a security risk to websites using this plugin. It is crucial to update to the latest version of the add-on to mitigate the vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for wp-premium/gravityforms →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to inject arbitrary HTML code into poll or quiz answers. This code is then executed by users in privileged roles, potentially leading to cross-site scripting (XSS) attacks and other security risks.

Users of the affected Gravity Forms add-on versions before 2.4.21 are vulnerable to this stored HTML injection issue. Specifically, users who have the poll and quiz features enabled in the add-on are at risk.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to apply the recommended security updates to mitigate the risk.

Yes, this vulnerability can be exploited remotely. Attackers can inject malicious HTML code into poll or quiz answers through the web interface, and the injected code will be executed when viewed by users in privileged roles.

Yes, the CVSS score for this vulnerability is 5.4, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for wp-premium/gravityforms.

How To Fix

Minimum fixed version

2.4.21

This is the first release that contains the fix.

composer require wp-premium/gravityforms:2.4.21

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