Skip to content

Missing escaping for show_all attribute in opt-out shortcode

Moderate
MatzeKitt published GHSA-3wv9-4rvf-w37g Nov 19, 2023

Package

Embed Privacy

Affected versions

< 1.8.1

Patched versions

1.8.1

Description

Impact

The Embed Privacy plugin for WordPress is vulnerable to Stored Cross-Site Scripting via 'embed_privacy_opt_out' shortcode in versions up to, and including, 1.8.0 due to insufficient input sanitization and output escaping on user supplied attributes.

This makes it possible for authenticated attackers with contributor-level and above permissions to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

Vulnerable File: embed-privacy/inc/class-embed-privacy.php

Line: 2153

POC Video: https://d.pr/v/ORuIat

(1) Install and activate the plugin as an administrator.

(2) As a contributor, create a post using the following shortcode:

[embed_privacy_opt_out show_all='xxx123" onmouseover=alert(1) foo="bar']

(3) When the administrator previews the post, and hovers the element, the XSS payload will execute.
POC Video: https://d.pr/v/ORuIat

Patches

Version 1.8.1 contains a patch.

Severity

Moderate
6.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

CVE ID

CVE-2023-48300

Weaknesses

No CWEs