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

Metadata and potential password leaks via --log= #1329

Closed
RootUp opened this issue Jan 1, 2019 · 4 comments
Closed

Metadata and potential password leaks via --log= #1329

RootUp opened this issue Jan 1, 2019 · 4 comments

Comments

@RootUp
Copy link

RootUp commented Jan 1, 2019

Hi Team,

I am using aria2 version 1.33.1 on 4.15.0-43-generic 46-Ubuntu.

  1. It was observed that URL's which gets downloaded via --log= attribute stored sensitive information.
  2. In combination with HTTP authentication a username and password can be part of the URL.
    aria2c --log=file https://user:passwd@example.com/
  • In such case the log file contains password as well, sometimes URL's may contain secret tokens, e.g. private file shares on a file hosting service.
  • In general storing metadata at unexpected places should be avoided.
  1. However, if the above steps are repeated using the below URL the log file does not contains password.
    aria2c --log=file https://t.me/socks?server=inputzero.io&port=22&user=dhiraj&pass=MystrongPassw0rd

Request team to have a look and validate.

@abergmann
Copy link

CVE-2019-3500 was assigned to this issue.

@kyoshidajp
Copy link

I'm not sure if this is the vulnerability. But if so, I noticed that Authorization and Cookie headers are included in the log file, too.

For example, run the following command.

aria2c --header='Cookie: key=value' \
    --header='Authorization: Digest username="admin"' \
    --log=file \
    http://example.com

then the following data is in the log file.

GET / HTTP/1.1
User-Agent: aria2/1.34.0
Accept: */*,application/metalink4+xml,application/metalink+xml
Host: example.com
Want-Digest: SHA-512;q=1, SHA-256;q=1, SHA;q=0.1
Cookie: key=value
Authorization: Digest username="admin"

@tatsuhiro-t
Copy link
Collaborator

aria2 only masks credentials which follows "Authorization: Basic ". No masking is made for userinfo subcomponent in URI.

I will change the code so that all authorization and cookie header fields are masked.
I have no plan masking userinfo in URL because it has been deprecated and considered insecure.

@tatsuhiro-t
Copy link
Collaborator

Fix committed via 3736813

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

No branches or pull requests

4 participants