CVE-2026-9855: Custom Field Template <= 2.7.8 - Authenticated (Contributor+) SQL Injection via 'post_ID' Parameter
The Custom Field Template plugin for WordPress is vulnerable to generic SQL Injection via the 'postID' parameter in all versions up to, and including, 2.7.8 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with contributor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database. The capability check via currentusercan('editpost', $id) is bypassable because WordPress internally casts $id to an integer for the permission evaluation while the full unsanitized string is preserved and passed to the SQL sink, and a valid nonce — which is also required — can be legitimately obtained by any Contributor-level user from the post edit screen.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
WordPress Custom Field Templateto a version that resolves this vulnerability.Fixed in 2.7.8 - Compensating control
Restrict Contributor-level (and above) users’ ability to access the post edit screen / obtain nonces, e.g., by limiting who can edit posts in WordPress to trusted accounts only.
Event History
Frequently Asked Questions
Can a low-privileged WordPress user exploit this issue?
Yes. An authenticated user with Contributor-level access or higher can exploit it, provided they have a valid nonce. Contributors can legitimately obtain the required nonce from the post edit screen.
Does the post-edit permission check block attempts against posts the attacker cannot edit?
Not reliably. WordPress casts the post ID to an integer during the permission check, but the unsanitized post_ID value is retained for the SQL query, allowing the check to be bypassed.
What is the likely security impact?
An attacker can append SQL to existing queries and extract sensitive information from the WordPress database. The provided assessment indicates high confidentiality impact, with no stated integrity or availability impact.