REPORT / 01
Analysis Report · Folder Analysis cache/royal-elementor-addons_1.7.1056 → cache/royal-elementor-addons_1.7.1057 — CVE-2026-5159
Shared security patch analysis results
02 ·
Lifecycle actions
cancel · resume · skip · regenerate · redo
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-2026-5159
NVD
AI-Generated Analysis
05 ·
Findings
filter · search · paginate
Showing 0 to 0 of 0 results
modules/instagram-feed/widgets/wpr-instagram-feed.php
AI: 9 vulnerabilities
CVE-2026-5159
--- cache/royal-elementor-addons_1.7.1056/modules/instagram-feed/widgets/wpr-instagram-feed.php 2026-05-02 00:02:52.087996999 +0000+++ cache/royal-elementor-addons_1.7.1057/modules/instagram-feed/widgets/wpr-instagram-feed.php 2026-05-06 00:15:30.652347510 +0000@@ -44,7 +44,7 @@ } public function get_script_depends() {- return [ 'swiper', 'wpr-isotope', 'wpr-lightgallery' ];+ return [ 'wpr-dompurify', 'swiper', 'wpr-isotope', 'wpr-lightgallery' ]; } public function get_style_depends() {@@ -4883,7 +4883,8 @@ if ( get_transient($key) === false || empty(get_transient($key)) || ($settings['instagram_access_token'] !== get_option('wpr_instagram_access_token_to_compare'. $this->get_ID())) ) { - $limit = !empty($settings['limit']) ? $settings['limit'] : 10;+ $limit = ! empty( $settings['limit'] ) ? absint( $settings['limit'] ) : 10;+ $access_token = rawurlencode( (string) $access_token ); $url = 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,thumbnail_url,permalink,children,username,caption,timestamp&access_token='. $access_token .'&limit='. $limit; @@ -4946,11 +4947,12 @@ } public function refresh_access_token($access_token) {+ $access_token = rawurlencode( (string) $access_token ); $url = 'https://graph.instagram.com/refresh_access_token?grant_type=ig_refresh_token&access_token='.$access_token.''; $response = wp_remote_get($url); if(!isset($body)) { $body = json_decode($response['body']);- if ($body->error) {+ if ($body && $body->error) { $this->reauthorization_needed = true; } else { set_transient('wpr_instagram_access_token'. $this->get_ID(), $body->access_token, $body->expires_in);@@ -5010,7 +5012,7 @@ $target = 'yes' == $this->get_settings()['open_in_new_tab'] ? '_blank' : '_self'; - echo '<div class="wpr-insta-feed-media-hover-bg '. esc_attr($this->get_animation_class( $settings, 'overlay' )) .'" data-url="'. esc_attr( $result->permalink ) .'" data-target="'. $target .'">';+ echo '<div class="wpr-insta-feed-media-hover-bg '. esc_attr($this->get_animation_class( $settings, 'overlay' )) .'" data-url="'. esc_url( $result->permalink ) .'" data-target="'. esc_attr( $target ) .'">'; echo '</div>'; }@@ -5025,7 +5027,7 @@ echo '<'. esc_attr($element_username_tag) .' class="'. esc_attr($class) .'">'; echo '<div class="inner-block">';- echo '<a href="'. $result->permalink .'" target="'. $target .'">';+ echo '<a href="'. esc_url( $result->permalink ) .'" target="'. esc_attr( $target ) .'">'; echo esc_html($result->username); echo '</a>'; echo '</div>';@@ -5044,7 +5046,8 @@ if ( 'word_count' === $settings['element_trim_text_by'] ) { echo esc_html(wp_trim_words($result->caption, $settings['element_word_count'])); } else {- echo substr(html_entity_decode($result->caption), 0, $settings['element_letter_count']) .'...';+ $caption = html_entity_decode( wp_strip_all_tags( (string) $result->caption ), ENT_QUOTES, get_bloginfo( 'charset' ) );+ echo esc_html( wp_html_excerpt( $caption, absint( $settings['element_letter_count'] ), '...' ) ); } echo '</p></figcaption>'; echo '</div>';@@ -5091,7 +5094,7 @@ echo '<div class="'. esc_attr($class) .'">'; echo '<div class="inner-block">';- echo '<a href='. $result->permalink .' target='. $target .'>';+ echo '<a href="'. esc_url( $result->permalink ) .'" target="'. esc_attr( $target ) .'">'; echo '<i class="fab fa-instagram"></i>'; echo '</a>'; echo '</div>';@@ -5394,7 +5397,7 @@ 'iframeMaxWidth' => '60%', 'hash' => false, 'autoplay' => $settings['lightbox_popup_autoplay'],- 'pause' => $settings['lightbox_popup_pause'] * 1000,+ 'pause' => absint( ( floatval( $settings['lightbox_popup_pause'] ?: 1 ) ) * 1000 ), 'progressBar' => $settings['lightbox_popup_progressbar'], 'counter' => $settings['lightbox_popup_counter'], 'controls' => $settings['lightbox_popup_arrows'],@@ -5408,7 +5411,6 @@ ]; $instagram_settings['insta_load_more_settings'] = [- 'instagram_access_token' => $settings['instagram_access_token'], 'limit' => (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) && $settings['limit'] > 6 ? 6 : $settings['limit'], 'limit_mobile' => (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) && $settings['limit_mobile'] > 6 ? 6 : $settings['limit_mobile'], 'is_mobile' => wp_is_mobile() ? 'mobile' : 'other',@@ -5546,7 +5548,7 @@ \Elementor\Icons_Manager::render_icon( $settings['instagram_follow_icon'], [ 'aria-hidden' => 'true' ] ); } ?>- <?php echo $settings['instagram_follow_text'] ?>+ <?php echo esc_html__($settings['instagram_follow_text']) ?> </a> </div> <?php endif; ?>@@ -5590,12 +5592,12 @@ ?> <div class="wpr-insta-feed-media-wrap <?php echo esc_attr($this->get_image_effect_class( $settings )) ?>" data-overlay-link="<?php echo esc_attr( $settings['overlay_post_link'] ) ?>"> <?php if ( 'CAROUSEL_ALBUM' == $result->media_type || 'IMAGE' == $result->media_type ) : ?>- <div class="wpr-insta-feed-image-wrap" data-src=<?php echo $result->media_url ?>>- <img src=<?php echo $result->media_url ?> alt="">+ <div class="wpr-insta-feed-image-wrap" data-src="<?php echo esc_url( $result->media_url ); ?>">+ <img src="<?php echo esc_url( $result->media_url ); ?>" alt=""> </div> <?php elseif ($result->media_type == 'VIDEO') : ?>- <div class="wpr-insta-feed-image-wrap" data-src=<?php echo $result->thumbnail_url ?>>- <img class="wpr-insta-feed-thumb" src=<?php echo $result->thumbnail_url ?> alt="">+ <div class="wpr-insta-feed-image-wrap" data-src="<?php echo esc_url( $result->thumbnail_url ); ?>">+ <img class="wpr-insta-feed-thumb" src="<?php echo esc_url( $result->thumbnail_url ); ?>" alt=""> </div> <?php endif ; ?> <div class="wpr-insta-feed-media-hover wpr-animation-wrap">@@ -5641,7 +5643,7 @@ \Elementor\Icons_Manager::render_icon( $settings['instagram_follow_icon'], [ 'aria-hidden' => 'true' ] ); } ?>- <?php echo $settings['instagram_follow_text'] ?>+ <?php echo esc_html__($settings['instagram_follow_text']) ?> </a> </div> <?php endif;
AI Analysis
# Security Vulnerability Analysis
## Vulnerability 1: Command Injection / URL Parameter Tampering
**Vulnerability Existed:** yes
**[URL Parameter Injection / Unvalidated Access Token]** [wpr-instagram-feed.php] [Lines 4886-4887]
**Old Code:**
```php
$limit = !empty($settings['limit']) ? $settings['limit'] : 10;
$url = 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,thumbnail_url,permalink,children,username,caption,timestamp&access_token='. $access_token .'&limit='. $limit;
```
**Fixed Code:**
```php
$limit = ! empty( $settings['limit'] ) ? absint( $settings['limit'] ) : 10;
$access_token = rawurlencode( (string) $access_token );
$url = 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,thumbnail_url,permalink,children,username,caption,timestamp&access_token='. $access_token .'&limit='. $limit;
```
---
## Vulnerability 2: Unvalidated Access Token in Token Refresh
**Vulnerability Existed:** yes
**[URL Parameter Injection - Access Token]** [wpr-instagram-feed.php] [Line 4949]
**Old Code:**
```php
public function refresh_access_token($access_token) {
$url = 'https://graph.instagram.com/refresh_access_token?grant_type=ig_refresh_token&access_token='.$access_token.'';
```
**Fixed Code:**
```php
public function refresh_access_token($access_token) {
$access_token = rawurlencode( (string) $access_token );
$url = 'https://graph.instagram.com/refresh_access_token?grant_type=ig_refresh_token&access_token='.$access_token.'';
```
---
## Vulnerability 3: Null Pointer Exception / Type Error
**Vulnerability Existed:** yes
**[Insufficient Null Check]** [wpr-instagram-feed.php] [Line 4954]
**Old Code:**
```php
if ($body->error) {
```
**Fixed Code:**
```php
if ($body && $body->error) {
```
---
## Vulnerability 4: Cross-Site Scripting (XSS) - URL Attribute
**Vulnerability Existed:** yes
**[XSS via Unescaped URL]** [wpr-instagram-feed.php] [Lines 5013, 5030, 5097]
**Old Code:**
```php
echo '<div class="wpr-insta-feed-media-hover-bg '. esc_attr($this->get_animation_class( $settings, 'overlay' )) .'" data-url="'. esc_attr( $result->permalink ) .'" data-target="'. $target .'">';
echo '<a href="'. $result->permalink .'" target="'. $target .'">';
echo '<a href='. $result->permalink .' target='. $target .'>';
```
**Fixed Code:**
```php
echo '<div class="wpr-insta-feed-media-hover-bg '. esc_attr($this->get_animation_class( $settings, 'overlay' )) .'" data-url="'. esc_url( $result->permalink ) .'" data-target="'. esc_attr( $target ) .'">';
echo '<a href="'. esc_url( $result->permalink ) .'" target="'. esc_attr( $target ) .'">';
echo '<a href="'. esc_url( $result->permalink ) .'" target="'. esc_attr( $target ) .'">';
```
---
## Vulnerability 5: XSS via Unescaped User-Supplied Text
**Vulnerability Existed:** yes
**[XSS via Caption Display]** [wpr-instagram-feed.php] [Lines 5049-5050]
**Old Code:**
```php
echo substr(html_entity_decode($result->caption), 0, $settings['element_letter_count']) .'...';
```
**Fixed Code:**
```php
$caption = html_entity_decode( wp_strip_all_tags( (string) $result->caption ), ENT_QUOTES, get_bloginfo( 'charset' ) );
echo esc_html( wp_html_excerpt( $caption, absint( $settings['element_letter_count'] ), '...' ) );
```
---
## Vulnerability 6: XSS via Unescaped Image URLs
**Vulnerability Existed:** yes
**[XSS via Image URL Attributes]** [wpr-instagram-feed.php] [Lines 5595, 5598-5599]
**Old Code:**
```php
<div class="wpr-insta-feed-image-wrap" data-src=<?php echo $result->media_url ?>>
<img src=<?php echo $result->media_url ?> alt="">
<div class="wpr-insta-feed-image-wrap" data-src=<?php echo $result->thumbnail_url ?>>
<img class="wpr-insta-feed-thumb" src=<?php echo $result->thumbnail_url ?> alt="">
```
**Fixed Code:**
```php
<div class="wpr-insta-feed-image-wrap" data-src="<?php echo esc_url( $result->media_url ); ?>">
<img src="<?php echo esc_url( $result->media_url ); ?>" alt="">
<div class="wpr-insta-feed-image-wrap" data-src="<?php echo esc_url( $result->thumbnail_url ); ?>">
<img class="wpr-insta-feed-thumb" src="<?php echo esc_url( $result->thumbnail_url ); ?>" alt="">
```
---
## Vulnerability 7: Sensitive Data Exposure - Access Token in Client-Side Settings
**Vulnerability Existed:** yes
**[Sensitive Data Exposure]** [wpr-instagram-feed.php] [Line 5411]
**Old Code:**
```php
$instagram_settings['insta_load_more_settings'] = [
'instagram_access_token' => $settings['instagram_access_token'],
```
**Fixed Code:**
```php
$instagram_settings['insta_load_more_settings'] = [
// 'instagram_access_token' removed
```
---
## Vulnerability 8: XSS via Unescaped User Text
**Vulnerability Existed:** yes
**[XSS via Follow Text]** [wpr-instagram-feed.php] [Lines 5549, 5646]
**Old Code:**
```php
<?php echo $settings['instagram_follow_text'] ?>
```
**Fixed Code:**
```php
<?php echo esc_html__($settings['instagram_follow_text']) ?>
```
---
## Vulnerability 9: Type Coercion / Input Validation
**Vulnerability Existed:** yes
**[Insufficient Type Casting]** [wpr-instagram-feed.php] [Line 5400]
**Old Code:**
```php
'pause' => $settings['lightbox_popup_pause'] * 1000,
```
**Fixed Code:**
```php
'pause' => absint( ( floatval( $settings['lightbox_popup_pause'] ?: 1 ) ) * 1000 ),
```
CVE Analysis Results:
CVE-2026-5159: Yes
View CVE Description
The Royal Addons for Elementor plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the Instagram Feed widget's 'instagram_follow_text' setting in all versions up to, and including, 1.7.1056 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Note that exploitation requires that an administrator has previously configured the Instagram Feed widget with a valid Instagram access token on the site.
Showing 1 to 1 of 1 results