CVE-2022-50959 WordPress Contact Form Builder 1.6.1 Cross-Site Scripting via code_generator.php

Medium 5.1 Published Updated

Unauthenticated attackers can inject malicious JavaScript via the form_id parameter in Contact Form Builder, executing code in victim browsers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2022-50959?

CVE-2022-50959 is a medium-severity cross-site scripting vulnerability in wpdevart Contact Form Builder, published on 10 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

WordPress Contact Form Builder 1.6.1 contains a reflected cross-site scripting vulnerability that allows unauthenticated attackers to inject malicious scripts by exploiting the form_id parameter. Attackers can craft malicious URLs to code_generator.php with script payloads in the form_id parameter to execute arbitrary JavaScript in victim browsers.

Weakness: CWE-79

Which versions are affected by CVE-2022-50959?

How do I fix CVE-2022-50959?

No fix has been published for CVE-2022-50959 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2022-50959 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-50959 exists.

Sources

Also known as GHSA-4877-9g46-3gpq.

Is CVE-2022-50959 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free