VAITP Dataset

← Back to the dataset

CVE-2012-5494

Cross-site scripting (XSS) in Plone (before 4.2.3 and 4.3 beta 1)

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

Cross-site scripting (XSS) vulnerability in python_scripts.py in Plone before 4.2.3 and 4.3 before beta 1 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors, related to "{u,}translate."

CVSS base score
4.3
Published
2014-09-30
OWASP
A04 Insecure Design
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Configuration Issues
Subcategory
Cross-Site Scripting (XSS)
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Fixed by upgrading
Yes

Solution

Update to Plone version 4.2.3 or higher

Vulnerable code sample

def render(title):
    """Vulnerable function that demonstrates the security issue."""
    return f"<div>{title}</div>"

user_input = "<script>alert('XSS');</script>"
output = render(user_input)
print(output)

Patched code sample

import html

def render(title):
    """Secure function that fixes the vulnerability."""
    return f"<div>{html.escape(title)}</div>"

user_input = "<script>alert('XSS');</script>"
output = render(user_input)
print(output)

Cite this entry

@misc{vaitp:cve20125494,
  title        = {{Cross-site scripting (XSS) in Plone (before 4.2.3 and 4.3 beta 1)}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2014},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2012-5494},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2012-5494/}}
}
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 ::