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

Remote Code execution or|and Denial of Service #5558

Open
snyff opened this Issue Dec 18, 2018 · 6 comments

Comments

3 participants
@snyff
Copy link

snyff commented Dec 18, 2018

Gogs version (or commit ref): latest (0.11.79)
Can you reproduce the bug at https://try.gogs.io:
[ ] Yes (provide example URL)
[X] No it's currently down

I discovered a way to gain code execution (via a bypass of the authentication to gain admin access, very similar to #5469) or to trigger a small denial of service.

Can you confirm u@gogs.io is still the best email to send more details?

Best,
Louis

@Unknwon

This comment has been minimized.

Copy link
Member

Unknwon commented Dec 18, 2018

Can you confirm u@gogs.io is still the best email to send more details?

Yes, please send details to this email address. Thanks!

@snyff

This comment has been minimized.

Copy link

snyff commented Dec 18, 2018

Sent :)

Unknwon added a commit that referenced this issue Dec 18, 2018

@Unknwon

This comment has been minimized.

Copy link
Member

Unknwon commented Dec 18, 2018

Patch has pushed to fix this issue, please test on develop branch or https://try.gogs.io.

Unknwon added a commit that referenced this issue Dec 18, 2018

@Unknwon Unknwon added this to the 0.12 milestone Dec 19, 2018

@snyff snyff referenced this issue Dec 20, 2018

Closed

Remote Code Execution #5569

1 of 1 task complete

Unknwon added a commit that referenced this issue Dec 20, 2018

Unknwon added a commit that referenced this issue Dec 20, 2018

@svnk42

This comment has been minimized.

Copy link

svnk42 commented Dec 21, 2018

While analyzing this security issue, I noticed that the provided fix in SanitizePath() is incomplete. It is still possible to insert path traversal sequences (e.g. ..././..././) to write files to arbitrary directories. I'm not too familiar with go, but generally recommend path normalization functions to fix these type of issues.

@svnk42

This comment has been minimized.

Copy link

svnk42 commented Dec 21, 2018

#5564 should fix this.

@Unknwon

This comment has been minimized.

Copy link
Member

Unknwon commented Dec 25, 2018

Hi, I've updated detect functions, please help verify again, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment