Bug 812885 - (CVE-2012-2104) CVE-2012-2104 munin (munin-cgi-graph, munin-fastcgi-graph): Possibility to inject arbitrary strings into munin-cgi-graph.log
CVE-2012-2104 munin (munin-cgi-graph, munin-fastcgi-graph): Possibility to in...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20120413,reported=2...
: Security
Depends On: 812893 812894
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-16 09:32 EDT by Jan Lieskovsky
Modified: 2015-08-22 12:08 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-22 12:08:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Lieskovsky 2012-04-16 09:32:41 EDT
A security flaw was found in the way munin-cgi-graph and munin-fastcgi-graph tools of the Munin, a network-wide graphing framework performed provided input sanitization. A remote attacker could issue a specially-crafted CGI request, which once processed by munin-cgi-graph / munin-fastcgi-graph tools would allow the attacker to inject terminal escape sequences into the Munin log file, leading to possibility to execute arbitrary commands or overwrite files in such crafted log file was later inspected in terminal honouring such escape sequences.

References:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668666

Reproducer (from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668666#5):
printf 'GET /cgi-bin/munin-cgi-graph/%%0afoo%%0a/x/x-x.png HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n' | nc localhost 80
Comment 1 Jan Lieskovsky 2012-04-16 09:42:28 EDT
This issue affects [*] the versions of the munin package, as shipped with Fedora release of 15 and 16. Please schedule an update once final upstream patch is available.

--

This issue affects [*] the versions of the munin package, as shipped with Fedora EPEL 5 and Fedora EPEL 6. Please schedule an update once final upstream patch is available.

[*] Though particular Debian BTS entry:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668666#5

mentions this would be an issue only for Munin v2.x versions, if I looked into the code correctly, the $comment string (to be added into Munin log) isn't properly sanitized even in earlier versions and thus as such, there shouldn't be
precondition causing this to fail on earlier (current Fedora and EPEL Munin versions) too. Though didn't configure Munin to test and confirm this assumption (-^ based only on source code review).
Comment 2 Jan Lieskovsky 2012-04-16 09:47:29 EDT
Created munin tracking bugs for this issue

Affects: fedora-all [bug 812893]
Affects: epel-all [bug 812894]
Comment 3 Jan Lieskovsky 2012-04-16 09:56:39 EDT
CVE Request:
[2] http://www.openwall.com/lists/oss-security/2012/04/16/5
Comment 4 Kurt Seifried 2012-04-16 15:21:10 EDT
Added CVE as per http://www.openwall.com/lists/oss-security/2012/04/16/6

Note You need to log in before you can comment on or make changes to this bug.