Content.ad - Reflected cross-site scripting (XSS)

4,8

Medium

Detected by

Fluid Attacks SAST Scanner

Disclosed by

Andres Roldan

Offensive Team, Fluid Attacks

Summary

Full name

Content.ad 1.3. - Reflected cross-site scripting (XSS)

Code name

State

Private

Release date

14 mar 2025

Affected product

Content.ad

Affected version(s)

Version 1.3.

Vulnerability name

Reflected cross-site scripting (XSS)

Remotely exploitable

No

CVSS v4.0 vector string

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:L/SC:L/SI:L/SA:L/E:U

CVSS v4.0 base score

4.8

Exploit available

No

Description

Content.ad 1.3. was found to be vulnerable. The web application dynamically generates web content without validating the source of the potentially untrusted data in myapp/includes/post-type.class.php.

Vulnerability

Skims by Fluid Attacks discovered a Reflected cross-site scripting (XSS) in Content.ad 1.3.. The following is the output of the tool:

Skims output

 234 | function save_post( $post_id ) {
 235 | if ( 'content_ad_widget' == get_post_type( $post_id ) ) {
 236 | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
 237 | return $post_id;
 238 | }
 239 | if( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
 240 | contentAd_append_to_log( 'AJAX ""QUICK EDIT"" SAVE' );
 241 | if( isset( $_POST['action'] ) && isset( $_POST['screen'] ) && 'inline-save' == $_POST['action'] && 'edit-content_ad_
 242 |
 243 | // If Template Tag or Shortcode placements are selected, then all other placement options are reset since they may
 244 | if( isset( $_POST['placement'] ) && ( $_POST['placement'] == 'in_function' || $_POST['placement'] == 'in_shortcode'
 245 | $_POST['_ca_display_home'] = 1;
 246 | $_POST['_ca_display_cat_tag'] = 1;
 247 | unset($_POST['post_category']); $_POST['post_category'] = array();
 248 | unset($_POST['post_tag']); $_POST['post_tag'] = array();
 249 |
 250 | }
 251 |
 252 | if ( isset( $_POST['_ca_display_home'] ) ) {
 253 | contentAd_append_to_log( ' UPDATING _ca_display_home FOR POST ('.$post_id.') TO: ' . $_POST['_ca_display_home']
 254 | update_post_meta( $post_id, '_ca_display_home', strip_tags( $_POST['_ca_display_home'] ) );
 255 | } else {
 256 | contentAd_append_to_log( ' UPDATING _ca_display_home FOR POST ('.$post_id.') TO: 0' );
 257 | delete_post_meta( $post_id, '_ca_display_home' );
 258 | }
 259 |
 260 | if ( isset( $_POST['_ca_display_cat_tag'] ) ) {
 261 | contentAd_append_to_log( ' UPDATING _ca_display_cat_tag PLACEMENT FOR POST ('.$post_id.') TO: ' . $_POST['_ca_d
 262 | update_post_meta( $post_id, '_ca_display_cat_tag', strip_tags( $_POST['_ca_display_cat_tag'] ) );
 263 | } else {
 264 | contentAd_append_to_log( ' UPDATING _ca_display_cat_tag FOR POST ('.$post_id.') TO: 0' );
 265 | delete_post_meta( $post_id, '_ca_display_cat_tag' );
 266 | }
 267 |
 268 | if ( isset( $_POST['placement'] ) ) {
 269 | contentAd_append_to_log( ' UPDATING PLACEMENT FOR POST ('.$post_id.') TO: ' . $_POST['placement'] );
 270 | update_post_meta( $post_id, 'placement', strip_tags( $_POST['placement'] ) );
 271 | }
 272 |
 273 | if( isset( $_POST['post_category'] ) && is_array( $_POST['post_category'] ) ) {
 274 | foreach( $_POST['post_category'] as $key => $cat_id ) {
 275 | if( empty( $cat_id ) ) {
 276 | unset( $_POST['post_category'][$key] );
 277 | } else {
 278 | $_POST['post_category'][$key] = (int) $cat_id;
 279 | }
 280 | }
 281 | contentAd_append_to_log( ' UPDATING EXCLUSION CATEGORIES FOR POST ('.$post_id.') TO: ' . join(', ', $_POST['pos
 282 | update_post_meta( $post_id, '_excluded_categories', $_POST['post_category'] );
 283 | }
 284 |
> 285 | echo $_POST['post_tag'];
 286 |
 287 | if( isset( $_POST['post_tag'] ) ) {
 288 | $tags = explode(',', preg_replace( '/, /', ',', strip_tags( implode("" "", $_POST['post_tag']) ) ));
 289 | $terms = array();
 290 | $terms = array_unique($terms);
 291 | foreach( $tags as $tag ) {
 292 | $term = get_term_by( 'name', $tag, 'post_tag' );
 293 | if( $term ) {
 294 | $terms[] = $term->name;
  295 |         } else {
  296 |          wp_insert_term( $tag, 'post_tag' );
  297 |          contentAd_append_to_log( '    ADDING NEW EXCLUSION TAGS: ' . join( ', ', $return ) );
  298 |          $terms[] = $tag;
  299 |          $new_terms[] = $tag;
  300 |         }
  301 |        }
  302 |        if($new_terms) {
  303 |         contentAd_append_to_log( '    ADDING NEW EXCLUSION TAGS: ' . join( ', ', $new_terms ) );
  304 |        }
  305 |        contentAd_append_to_log( '    UPDATING EXCLUSION TAGS FOR POST ('.$post_id.') TO: ' . join( ', ', $terms ) );
  306 |        update_post_meta( $post_id, '_excluded_tags', join( ', ', $terms ) );
  307 |       }
  308 |      }
  309 |     }
  310 |    }
  311 |   }
      ^ Col 0

Our security policy

We have reserved the ID CVE-2025-31292 to refer to this issue from now on. Disclosure policy

System Information

  • Product: Content.ad

  • Version: 1.3.

Mitigation

There is currently no patch available for this vulnerability.

Timeline

IA generativa

14 mar 2025

Vendor contacted

14 mar 2025

Inicia tu prueba gratuita de 21 días

Descubre los beneficios de nuestra solución Hacking Continuo, de la que ya disfrutan empresas de todos los tamaños.

Inicia tu prueba gratuita de 21 días

Descubre los beneficios de nuestra solución Hacking Continuo, de la que ya disfrutan empresas de todos los tamaños.

Inicia tu prueba gratuita de 21 días

Descubre los beneficios de nuestra solución Hacking Continuo, de la que ya disfrutan empresas de todos los tamaños.

Las soluciones de Fluid Attacks permiten a las organizaciones identificar, priorizar y remediar vulnerabilidades en su software a lo largo del SDLC. Con el apoyo de la IA, herramientas automatizadas y pentesters, Fluid Attacks acelera la mitigación de la exposición al riesgo de las empresas y fortalece su postura de ciberseguridad.

SOC 2 Type II

SOC 3

Suscríbete a nuestro boletín

Mantente al día sobre nuestros próximos eventos y los últimos blog posts, advisories y otros recursos interesantes.

Las soluciones de Fluid Attacks permiten a las organizaciones identificar, priorizar y remediar vulnerabilidades en su software a lo largo del SDLC. Con el apoyo de la IA, herramientas automatizadas y pentesters, Fluid Attacks acelera la mitigación de la exposición al riesgo de las empresas y fortalece su postura de ciberseguridad.

SOC 2 Type II

SOC 3

Suscríbete a nuestro boletín

Mantente al día sobre nuestros próximos eventos y los últimos blog posts, advisories y otros recursos interesantes.

Las soluciones de Fluid Attacks permiten a las organizaciones identificar, priorizar y remediar vulnerabilidades en su software a lo largo del SDLC. Con el apoyo de la IA, herramientas automatizadas y pentesters, Fluid Attacks acelera la mitigación de la exposición al riesgo de las empresas y fortalece su postura de ciberseguridad.

SOC 2 Type II

SOC 3

Suscríbete a nuestro boletín

Mantente al día sobre nuestros próximos eventos y los últimos blog posts, advisories y otros recursos interesantes.