VAITP Dataset

← Back to the dataset

CVE-2022-23599

Cache poisoning in Products.ATContentTypes prior to version 3.0.6

  • CVSS 6.1
  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • Configuration Issues
  • Remote

Products.ATContentTypes are the core content types for Plone 2.1 – 4.3. Versions of Plone that are dependent on Products.ATContentTypes prior to version 3.0.6 are vulnerable to reflected cross site scripting and open redirect when an attacker can get a compromised version of the image_view_fullscreen page in a cache, for example in Varnish. The technique is known as cache poisoning. Any later visitor can get redirected when clicking on a link on this page. Usually only anonymous users are affected, but this depends on the user's cache settings. Version 3.0.6 of Products.ATContentTypes has been released with a fix. This version works on Plone 5.2, Python 2 only. As a workaround, make sure the image_view_fullscreen page is not stored in the cache. More information about the vulnerability and cvmitigation measures is available in the GitHub Security Advisory.

CVSS base score
6.1
Published
2022-01-28
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Function
Code defect classification
Missing Functionality
Category
Configuration Issues
Subcategory
Open Redirects
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Fixed by upgrading
Yes

Solution

Update Products.ATContentTypes to version 3.0.6 or higher.

Vulnerable code sample

def image_view_fullscreen(context, request):
    redirect_url = request.get('redirect', None)
    
    if redirect_url:
        return redirect(redirect_url)

    return render_image(context)

Patched code sample

from Products.CMFCore.utils import getToolByName
from plone.api.content import get_view

def image_view_fullscreen(context, request):
    redirect_url = request.get('redirect', '')
    
    if not check_redirect_url(redirect_url):
        return "Invalid redirect URL"

    return get_view('image_view_fullscreen', context, request)()

def check_redirect_url(url):
    allowed_domains = ['example.com', 'another-example.com']
    for domain in allowed_domains:
        if url.startswith(f"http://{domain}") or url.startswith(f"https://{domain}"):
            return True
    return False

Cite this entry

@misc{vaitp:cve202223599,
  title        = {{Cache poisoning in Products.ATContentTypes prior to version 3.0.6}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2022},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2022-23599},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2022-23599/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::