VAITP Dataset

← Back to the dataset

CVE-2015-7489

IBM SPSS Statistics 22.0.0.2 and 23.0.0.2 have weak permissions, enabling local users to gain privileges via Python script modification

  • CVSS 7.8
  • CWE-264
  • Authentication, Authorization, and Session Management
  • Local

IBM SPSS Statistics 22.0.0.2 before IF10 and 23.0.0.2 before IF7 uses weak permissions (Everyone: Write) for Python scripts, which allows local users to gain privileges by modifying a script.

CVSS base score
7.8
Published
2016-01-01
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Local
Impact
Privilege Escalation
Affected component
Python
Fixed by upgrading
Yes

Solution

Update IBM SPSS Statistics to a version with the security fix.

Vulnerable code sample

import os

# Path to the directory containing the Python scripts
script_directory = '/path/to/spss/scripts'

# Set weak permissions that allow everyone to write
def set_weak_permissions(directory):
    for root, dirs, files in os.walk(directory):
        for file in files:
            file_path = os.path.join(root, file)
            # Change permissions to allow everyone to write
            os.chmod(file_path, 0o666)  # rw-rw-rw-

# Call the function to set weak permissions
set_weak_permissions(script_directory)

Patched code sample

import os
import stat

# Path to the directory containing the Python scripts
script_directory = '/path/to/spss/scripts'

# Set permissions to restrict access
def secure_script_permissions(directory):
    for root, dirs, files in os.walk(directory):
        for file in files:
            file_path = os.path.join(root, file)
            # Change permissions to read and execute for owner only
            os.chmod(file_path, stat.S_IRUSR | stat.S_IXUSR)

# Call the function to secure script permissions
secure_script_permissions(script_directory)

Cite this entry

@misc{vaitp:cve20157489,
  title        = {{IBM SPSS Statistics 22.0.0.2 and 23.0.0.2 have weak permissions, enabling local users to gain privileges via Python script modification}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2016},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2015-7489},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2015-7489/}}
}

Download this entry as JSON Download the whole dataset

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 ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.