WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact
WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact

WordPress Plugin Vulnerabilities

Photo Gallery < 1.8.3 - Stored XSS via CSRF

Description

The plugin does not validate and escape some parameters before outputting them back in in JS code later on in another page, which could lead to Stored XSS issue when an attacker makes a logged in admin open a malicious URL or page under their control.

Note: The XSS will only trigger for the attacked user and be reset when they logout

Proof of Concept

Make a logged in admin open one of the below URL:

https://example.com/wp-admin/admin-ajax.php?action=addMusic&sort_by=%22;alert(/XSS/);%22
https://example.com/wp-admin/admin-ajax.php?action=addMusic&sort_by=size&sort_order=%22;alert(/XSS-order/);%22

Even though the request above will result in a "Sorry, your nonce did not verify." error, the XSS payload will trigger when an admin attempts to add a new image to a gallery. 

Affects Plugins

photo-gallery
Fixed in version 1.8.3

References

CVE
CVE-2022-4058

Classification

Type

XSS

OWASP top 10
A7: Cross-Site Scripting (XSS)
CWE
CWE-79

Miscellaneous

Original Researcher

Krzysztof Zając

Submitter

Krzysztof Zając

Submitter website
https://kazet.cc/
Submitter twitter
kazet1234
Verified

Yes

WPVDB ID
89656cb3-4611-4ae7-b7f8-1b22eb75cfc4

Timeline

Publicly Published

2022-11-28 (about 6 months ago)

Added

2022-11-28 (about 6 months ago)

Last Updated

2022-11-28 (about 6 months ago)

Our Other Services

WPScan WordPress Security Plugin
WPScan

Vulnerabilities

WordPressPluginsThemesOur StatsSubmit vulnerabilities

About

How it worksPricingWordPress pluginNewsContact

For Developers

StatusAPI detailsCLI scanner

Other

PrivacyTerms of serviceSubmission termsDisclosure policyPrivacy Notice for California Users
jetpackIn partnership with Jetpack
githubtwitterfacebook
Angithubendeavor
Work With Us