Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 495182 (CVE-2013-7300) - <media-sound/cantata-1.2.2: internal http server allows to download any file (CVE-2013-{7300,7301})
Summary: <media-sound/cantata-1.2.2: internal http server allows to download any file ...
Status: RESOLVED FIXED
Alias: CVE-2013-7300
Product: Gentoo Security
Classification: Unclassified
Component: Auditing (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://code.google.com/p/cantata/iss...
Whiteboard: ~3 [noglsa]
Keywords:
Depends on: 497152
Blocks:
  Show dependency tree
 
Reported: 2013-12-24 06:35 UTC by Nikoli
Modified: 2014-02-04 14:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2013-12-24 06:35:35 UTC
cantata starts internal http server on external network interface by default, it is not possible to disable http server, but you can choose to listen localhost only.
I investigated how much it possible to download using this server: it lets anyone from external network and any user from your system to download any readable for you file. Even your ssh private keys.
I reported problem upstream:
https://code.google.com/p/cantata/issues/detail?id=356

Mistake is very obvious, not sure if it is not backdoor.
cantata checks only 2 things:
1) user agent:
https://code.google.com/p/cantata/source/browse/trunk/http/httpsocket.cpp?spec=svn3682&r=3682#183
        if (str.startsWith("User-Agent:") && str.contains("Music Player Daemon")) {
            return true;
        }

2) 'cantata=song' in url:
https://code.google.com/p/cantata/source/browse/trunk/http/httpserver.cpp?spec=svn3687&r=3687#237
    if (q.hasQueryItem("cantata") && q.queryItemValue("cantata")=="song") {

So simple wget command works fine for getting ssh keys:
wget --user-agent='Music Player Daemon 0.17.4' "http://127.0.0.1:37420/home/me/.ssh/id_rsa?cantata=song -O id_rsa
Comment 1 Sergey Popov gentoo-dev 2013-12-24 11:28:15 UTC
Thanks for the report
Comment 2 Sergey Popov gentoo-dev 2014-01-20 10:31:58 UTC
Rerate as ~3, cause there are no stable versions in tree. 1.2.2 fixes this issue, so closing this as FIXED too.
Comment 3 GLSAMaker/CVETool Bot gentoo-dev 2014-02-04 14:01:17 UTC
CVE-2013-7301 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2013-7301):
  Cantata before 1.2.2 does not restrict access to files in the play queue,
  which allows remote attackers to obtain sensitive information by reading the
  songs in the queue.

CVE-2013-7300 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2013-7300):
  Absolute path traversal vulnerability in cantata before 1.2.2 allows local
  users to read arbitrary files via a full pathname in a request to the
  internal httpd server.  NOTE: this vulnerability can be leveraged by remote
  attackers using CVE-2013-7301.