Bug 43830 - Remove publicly visible CGI script
Remove publicly visible CGI script
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: SAML
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-13 14:45 CET by Philipp Hahn
Modified: 2021-04-12 14:43 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Security Issue
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): SAML, Security
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-03-13 14:45:22 CET
<http://ucs-sso.$FQDN/saml/php-cgi> maps to /var/www/saml/php-cgi.
There is no need to make 'ScriptAlias' directories publicly visible; this is considered very bad practice and can be a security risk.
Comment 1 Florian Best univentionstaff 2017-03-13 14:54:59 CET
Somehow we couldn't find a working way in UCS 4.1 not exposing it. If you have one tell me.
Comment 2 Florian Best univentionstaff 2017-03-13 16:36:57 CET
The problem is that we need suexec to force simplesamlphp via php5-cgi to be executed as a different user than www-data.
Comment 3 Ingo Steuwer univentionstaff 2020-07-03 20:52:05 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 4 Philipp Hahn univentionstaff 2020-07-04 08:45:13 CEST
This still is an unfixed security issue.
Comment 5 Philipp Hahn univentionstaff 2021-04-12 14:43:48 CEST
The use of binary package `apache2-suexec-pristine` requires the CGI script to be installed below /var/www/. Using `apache2-suexec-custom` instead would allow this to be configured.

This is one of the reasons why Debian switched to exporting /var/www/html/ instead so other files can be placed below /var/www/ without exposing them, but UCS never picked that up that change.

Switching to `php-fpm` would also solve this issue, see Bug #48042 for that.