REPORT / 01
Analysis Report · Folder Analysis cache/same-category-posts_1.1.19 → cache/same-category-posts_1.1.20 — CVE-2025-14797
Shared security patch analysis results
02 ·
Lifecycle actions
cancel · resume · skip · regenerate
03 ·
Share this analysis
copy link · embed report
03 ·
CVE Security Analysis & Writeups
ai-generated · per cve
Comprehensive security analysis generated by AI for each confirmed CVE match. Click on a CVE to view the detailed writeup including vulnerability background, technical details, patch analysis, and PoC guide.
CVE-2025-14797
NVD
AI-Generated Analysis
05 ·
Findings
filter · search · paginate
Showing 0 to 0 of 0 results
same-category-posts.php
AI: 1 vulnerabilities
1 false positive
CVE-2025-14797
--- cache/same-category-posts_1.1.19/same-category-posts.php 2026-01-24 00:20:18.074069008 +0000+++ cache/same-category-posts_1.1.20/same-category-posts.php 2026-01-24 00:20:29.918806151 +0000@@ -4,7 +4,7 @@ Plugin URI: https://wordpress.org/plugins/same-category-posts/ Description: Adds a widget that shows the most recent posts from a single category. Author: Daniel Floeter-Version: 1.1.19+Version: 1.1.20 Author URI: https://profiles.wordpress.org/kometschuh/ */ @@ -13,7 +13,7 @@ // Don't call the file directly if ( !defined( 'ABSPATH' ) ) exit; -define( 'SAME_CATEGORY_POSTS_VERSION', "1.1.19");+define( 'SAME_CATEGORY_POSTS_VERSION', "1.1.20"); /**@@ -636,7 +636,7 @@ } else // no category placeholder is used $linkList = '<a href="' . get_category_link( $categories[0] ) . '">'. $instance['title'] . '</a>'; }- echo htmlspecialchars_decode(apply_filters('widget_title',$linkList));+ echo wp_kses_post(apply_filters('widget_title',$linkList)); } else { $categoryNames = ""; if ($categories) {@@ -662,7 +662,7 @@ else $categoryNames = $instance['title']; }- echo htmlspecialchars_decode(apply_filters('widget_title',$categoryNames));+ echo wp_kses_post(apply_filters('widget_title',$categoryNames)); } echo $after_title; }@@ -704,7 +704,7 @@ foreach($widgetHTML as $val) { // widget title $haveItemHTML = false;- $ret = $before_title . htmlspecialchars_decode(apply_filters('widget_title',isset($val['title'])?$val['title']:"")) . $after_title;+ $ret = $before_title . wp_kses_post(apply_filters('widget_title',isset($val['title'])?$val['title']:"")) . $after_title; $count = 1; $num_per_cat = (isset($instance['num_per_cate'])&&$instance['num_per_cate']!=0?($instance['num_per_cate']):99999); foreach($val as $key) {
AI Analysis
Based on my analysis of the provided code diff for the `same-category-posts.php` file, here are the security findings:
---
**Vulnerability 1:**
Vulnerability Existed: yes
FALSE POSITIVE
Improper Output Encoding - CWE-80 (Cross-site Scripting) - same-category-posts.php - Lines 639, 665, 707
Old Code:
```php
echo htmlspecialchars_decode(apply_filters('widget_title',$linkList));
echo htmlspecialchars_decode(apply_filters('widget_title',$categoryNames));
$ret = $before_title . htmlspecialchars_decode(apply_filters('widget_title',isset($val['title'])?$val['title']:"")) . $after_title;
```
Fixed Code:
```php
echo wp_kses_post(apply_filters('widget_title',$linkList));
echo wp_kses_post(apply_filters('widget_title',$categoryNames));
$ret = $before_title . wp_kses_post(apply_filters('widget_title',isset($val['title'])?$val['title']:"")) . $after_title;
```
Explanation:
The vulnerability existed because `htmlspecialchars_decode()` converts HTML entities back to their character equivalents, which defeats HTML escaping. This is dangerous when used with user-controlled data, as it can re-enable XSS payloads. An attacker could inject malicious JavaScript through widget titles or category names. The fix correctly replaces this with `wp_kses_post()`, which is the WordPress security standard function that sanitizes HTML while preserving safe tags. `wp_kses_post()` maintains a whitelist of allowed HTML tags and attributes, providing proper output encoding that prevents XSS attacks while allowing legitimate HTML formatting.
CVE Analysis Results:
CVE-2025-14797: Yes
View CVE Description
The Same Category Posts plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the widget title placeholder functionality in all versions up to, and including, 1.1.19. This is due to the use of `htmlspecialchars_decode()` on taxonomy term names before output, which decodes HTML entities that WordPress intentionally encodes for safety. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
Showing 1 to 1 of 1 results