Bug 41736

Summary: UMC-client executes code
Product: UCS Reporter: Florian Best <best>
Component: UMC (Generic)Assignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Dirk Wiesenthal <wiesenthal>
Severity: normal    
Priority: P5    
Version: UCS 4.1   
Target Milestone: UCS 4.1-2-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Security Issue What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 5: Will affect all installed domains How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Security
Max CVSS v3 score:

Description Florian Best univentionstaff 2016-07-05 19:36:32 CEST
umc-command -o "__import__('os').system('touch /tmp/hacked'):foo=bar" -n
umc-command -e -o "__import__('os').system('touch /tmp/hacked')" -n

As we use this script in various places with arguments from user input we should not allow code execution.
Comment 1 Florian Best univentionstaff 2016-07-12 13:40:29 CEST
Replace eval() by ast.literal_eval().

univention-management-console.yaml:
r70940 | YAML Bug #41736

univention-management-console (8.0.28-17):
r70939 | Bug #41736: don't execute/evaluate code in umc-client arguments
Comment 2 Dirk Wiesenthal univentionstaff 2016-07-18 14:24:18 CEST
There are little backward incompatibilities.

Anyway, the "features" dropped are not used and not useful.

Code: OK
YAML: OK
Comment 3 Janek Walkenhorst univentionstaff 2016-07-21 15:16:24 CEST
<http://errata.software-univention.de/ucs/4.1/212.html>