CVE-2021-25975: Cross site scripting in publify
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.43188%
CWE
Published
5/24/2022
Updated
1/27/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| publify_core | rubygems | >= 8.0, < 9.2.5 | 9.2.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from insufficient file type validation in the ResourceUploader. The patch added a content_type_allowlist to restrict uploads, and the commit message explicitly states this was to prevent HTML uploads. The vulnerable version lacked this allowlist, relying only on check_image_content_type! which was insufficient as it only handled image validation. The tests added in resources_controller_spec.rb confirm the attack vector involved HTML file uploads through this uploader.