CVE-2019-14347
Schben Adive 2.0.7 allows remote users to create admin accounts via "admin/user/add"
- CVSS 8.8
- CWE-425 Direct Request ('Forced Browsing')
- Authentication, Authorization, and Session Management
- Remote
Internal/Views/addUsers.php in Schben Adive 2.0.7 allows remote unprivileged users (editor or developer) to create an administrator account via admin/user/add, as demonstrated by a Python PoC script.
- CVSS base score
- 8.8
- Published
- 2019-08-06
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Privilege Escalation
- Accessibility scope
- Remote
- Impact
- Privilege Escalation
- Affected component
- Schben Adive
- Fixed by upgrading
- Yes
Solution
Update Schben Adive to version 2.0.8 or higher.
Vulnerable code sample
from flask import Flask, request
app = Flask(__name__)
# Mock user database
users = {
'admin': {'role': 'administrator'},
'editor': {'role': 'editor'},
'developer': {'role': 'developer'}
}
@app.route('/admin/user/add', methods=['POST'])
def add_user():
current_user = request.form.get('current_user')
new_username = request.form.get('new_username')
new_role = request.form.get('new_role')
# No role check, any user can add a new user
users[new_username] = {'role': new_role}
return f'User {new_username} added with role {new_role}.', 201
if __name__ == '__main__':
app.run()Patched code sample
from flask import Flask, request, abort
app = Flask(__name__)
# Mock user database
users = {
'admin': {'role': 'administrator'},
'editor': {'role': 'editor'},
'developer': {'role': 'developer'}
}
def is_admin(user):
return users.get(user, {}).get('role') == 'administrator'
@app.route('/admin/user/add', methods=['POST'])
def add_user():
current_user = request.form.get('current_user')
new_username = request.form.get('new_username')
new_role = request.form.get('new_role')
# Check if the current user is an administrator
if not is_admin(current_user):
abort(403) # Forbidden
# Proceed to add the new user
users[new_username] = {'role': new_role}
return f'User {new_username} added with role {new_role}.', 201
if __name__ == '__main__':
app.run()Cite this entry
@misc{vaitp:cve201914347,
title = {{Schben Adive 2.0.7 allows remote users to create admin accounts via "admin/user/add"}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2019},
note = {VAITP Python Vulnerability Dataset, entry CVE-2019-14347},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2019-14347/}}
}
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 ::
