Custom Field Template <= 2.7.8 - Authenticated (Contributor+) SQL Injection via 'post_ID' Parameter
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
The Custom Field Template plugin for WordPress is vulnerable to generic SQL Injection via the 'post_ID' 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 current_user_can('edit_post', $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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- hiroaki-miyashita Custom Field Template
through 2.7.8
References 10
plugins.trac.wordpress.org
- browser/custom-field-template/tags/2.7.8/custom-field-template.php#L4442
- browser/custom-field-template/tags/2.7.8/custom-field-template.php#L3353
- browser/custom-field-template/tags/2.7.8/custom-field-template.php#L3479
- browser/custom-field-template/tags/2.7.8/custom-field-template.php#L105
- browser/custom-field-template/tags/2.7.7/custom-field-template.php#L4442
- browser/custom-field-template/tags/2.7.7/custom-field-template.php#L3353
- browser/custom-field-template/tags/2.7.7/custom-field-template.php#L3479
- browser/custom-field-template/tags/2.7.7/custom-field-template.php#L105
- changeset?reponame=&old=3589466%40custom-field-template&new=3589466%40custom-field-template