Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2020-35176: path traversal flaw #195

Closed
Beuc opened this issue Dec 9, 2020 · 3 comments · Fixed by #196
Closed

CVE-2020-35176: path traversal flaw #195

Beuc opened this issue Dec 9, 2020 · 3 comments · Fixed by #196

Comments

@Beuc
Copy link
Contributor

Beuc commented Dec 9, 2020

Hi,

It seems #90 is not completely fixed in 7.8.
(that is, even after CVE-2017-1000501 and CVE-2020-29600 are fixed)

Altering slightly the original example:
http://myserver.example.com/cgi-bin/awstats.pl?config=/etc/passwd
to e.g.:
http://myserver.example.com/cgi-bin/awstats.pl?config=passwd

Warning: Syntax error line 1 in file '/etc/passwd'. Config line is ignored.
Warning: Syntax error line 2 in file '/etc/passwd'. Config line is ignored.
Warning: Syntax error line 3 in file '/etc/passwd'. Config line is ignored.

http://myserver.example.com/cgi-bin/awstats.pl?config=/passwd

Warning: Syntax error line 1 in file '/etc//passwd'. Config line is ignored.
Warning: Syntax error line 2 in file '/etc//passwd'. Config line is ignored.
Warning: Syntax error line 3 in file '/etc//passwd'. Config line is ignored.

http://myserver.example.com/cgi-bin/awstats.pl?config=apache2/apache2.org

Warning: Syntax error line 80 in file '/etc/apache2/apache2.conf'. Config line is ignored.
Warning: Syntax error line 87 in file '/etc/apache2/apache2.conf'. Config line is ignored.
Warning: Syntax error line 92 in file '/etc/apache2/apache2.conf'. Config line is ignored.

it is still parsing /etc/*.

I'd expect it to only allow files within /etc/awstats/awstats*.conf.

Like #90 this requires that /etc/awstats/awstats.conf does not exist (e.g. in multi-hosting environments with no default config).

@carnil
Copy link

carnil commented Dec 9, 2020

@Beuc: since the fix for #90 and identified with CVE-2020-29600 is in a released version, can you request a new CVE id for this (new) incomplete fix respectively for this remaining path traversal issue?

@Beuc
Copy link
Contributor Author

Beuc commented Dec 9, 2020

@carnil: will do, leaving a couple days for the maintainer to confirm

@Beuc
Copy link
Contributor Author

Beuc commented Dec 12, 2020

This is now CVE-2020-35176.

Beuc added a commit to Beuc/awstats that referenced this issue Dec 17, 2020
@Beuc Beuc changed the title path traversal flaw CVE-2020-35176: path traversal flaw Jan 12, 2021
@eldy eldy closed this as completed in #196 Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants