Cookies for Comments Security & Risk Analysis

wordpress.org/plugins/cookies-for-comments

Sets a cookie on a random URL that is then checked when a comment is posted. If the cookie is missing the comment is marked as spam.

20K active installs v0.5.5 PHP + WP 3.1+ Updated Jun 4, 2019
commentscookiesspam
85
A · Safe
CVEs total0
Unpatched0
Last CVENever
Safety Verdict

Is Cookies for Comments Safe to Use in 2026?

Generally Safe

Score 85/100

Cookies for Comments has no known CVEs and is actively maintained. It's a solid choice for most WordPress installations.

No known CVEs Updated 6yr ago
Risk Assessment

The "cookies-for-comments" plugin v0.5.5 exhibits a generally strong security posture, with no known vulnerabilities (CVEs) or critical/high severity taint flows. The plugin demonstrates good practices by exclusively using prepared statements for SQL queries, implementing nonce checks, and utilizing capability checks for access control. Furthermore, the attack surface appears minimal, with no reported AJAX handlers, REST API routes, shortcodes, or cron events, and importantly, none of these entry points are unprotected.

However, there are a couple of areas for improvement. The static analysis identified the use of the `create_function` dangerous function, which is deprecated and can be a source of security risks if not handled with extreme care. Additionally, the output escaping is only 60% properly implemented, meaning there's a risk of cross-site scripting (XSS) vulnerabilities in the remaining 40% of outputs if user-supplied data is involved. The single file operation also warrants attention to ensure it's handled securely.

In conclusion, this plugin is relatively secure due to its limited attack surface and solid handling of SQL and authentication mechanisms. The primary concerns lie with the use of `create_function` and the incomplete output escaping, which, while not currently linked to any known vulnerabilities, represent potential attack vectors that should be addressed to further harden the plugin's security.

Key Concerns

  • Use of dangerous function 'create_function'
  • Low output escaping coverage (60%)
  • File operations present, requires careful review
Vulnerabilities
None known

Cookies for Comments Security Vulnerabilities

No known vulnerabilities — this is a good sign.
Code Analysis
Analyzed Mar 16, 2026

Cookies for Comments Code Analysis

Dangerous Functions
1
Raw SQL Queries
0
0 prepared
Unescaped Output
4
6 escaped
Nonce Checks
1
Capability Checks
2
File Operations
1
External Requests
0
Bundled Libraries
0

Dangerous Functions Found

create_functionadd_filter('pre_comment_approved', create_function('$a', 'return \'spam\';')); // thanks Akismetcookies-for-comments.php:112

Output Escaping

60% escaped10 total outputs
Data Flows
All sanitized

Data Flow Analysis

2 flows
cfc_conf (cookies-for-comments.php:127)
Source (user input) Sink (dangerous op) Sanitizer Transform Unsanitized Sanitized
Attack Surface

Cookies for Comments Attack Surface

Entry Points0
Unprotected0
WordPress Hooks 10
actionwp_headcookies-for-comments.php:39
actionwp_footercookies-for-comments.php:41
filterpreprocess_commentcookies-for-comments.php:80
actioninitcookies-for-comments.php:83
filterpre_comment_approvedcookies-for-comments.php:112
filterpreprocess_commentcookies-for-comments.php:120
actionadmin_menucookies-for-comments.php:125
filterplugin_action_linkscookies-for-comments.php:202
filtercomment_notification_textcookies-for-comments.php:228
filtercomment_moderation_textcookies-for-comments.php:229
Maintenance & Trust

Cookies for Comments Maintenance & Trust

Maintenance Signals

WordPress version tested5.2.24
Last updatedJun 4, 2019
PHP min version
Downloads107K

Community Trust

Rating98/100
Number of ratings18
Active installs20K
Developer Profile

Cookies for Comments Developer Profile

Donncha O Caoimh (a11n)

12 plugins · 32K total installs

73
trust score
Avg Security Score
91/100
Avg Patch Time
4657 days
View full developer profile
Detection Fingerprints

How We Detect Cookies for Comments

Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.

Asset Fingerprints

Asset Paths
/wp-content/plugins/cookies-for-comments/css.php

HTML / DOM Fingerprints

HTML Comments
<!-- Page generated by Cookies for Comments at http://ocaoimh.ie/cookies-for-comments/ -->
FAQ

Frequently Asked Questions about Cookies for Comments