Custom Contact Forms <= 7.21.0 - Authenticated (Author+) Insecure Direct Object Reference to Arbitrary Post Overwrite via Form Creation REST Route

Medium 6.5 CWE-639Fixed in 7.22.0
ID
WPSEC-2026-4232
Plugin
Custom Contact Forms (custom-contact-forms)
Affected
from 7.0 before 7.22.0
Remediation
Update to 7.22.0 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-639
Usage
Plugin Low · Affected versions Low among sites WPSec scans, 2026-11-29
Attack surface
Custom Contact Forms on WPSec AttackSurface
Fix released
Published

Description

The Custom Contact Forms plugin for WordPress is vulnerable to Insecure Direct Object Reference via the form creation REST API route (POST /wp-json/ccf/v1/forms) in all versions up to, and including, 7.21.0. This is due to the 'id' value in the request body being passed directly to wp_insert_post() as the post ID, without checking that the target post is a form or that the user is allowed to edit it. This makes it possible for authenticated attackers, with author-level access and above, to overwrite arbitrary posts, pages or forms, including content owned by other users and administrators. The overwritten post is turned into a published form, its title is replaced and its content is erased.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON, OSV or Markdown · All advisories: JSON, OSV, RSS

License: CC BY 4.0