Security Experts:

ShareLaTeX Fixes Remote Command Execution Vulnerability

Two security holes have been identified in ShareLaTeX, the online real-time collaborative LaTeX editor. Only one of the vulnerabilities has been addressed, but a workaround is available for the unpatched bug.

According to CERT/CC, the vulnerabilities affect ShareLaTeX versions prior to 0.1.3. One of the flaws is a path traversal (CVE-2015-0933) caused by the improper limitation of a pathname to a restricted directory. The bug allows a remote, authenticated attacker to gain access to information that can be used in further attacks.

“ShareLaTeX 0.1.3 and previous versions allow a remote user to obtain information about other users or the server on which ShareLaTeX is installed by allowing a user to \include{} any valid absolute path name in the document, which is then forwarded to the latex process. When processed, the output document will contain the contents of the file specified,” CERT noted in an advisory.

The second vulnerability can be exploited by a remote attacker to run arbitrary commands on the affected server with the privileges of the ShareLaTeX process. The command injection flaw (CVE-2015-0934) is caused by the improper filtering of special characters in filenames.

This vulnerability has been fixed in ShareLaTeX 0.1.3 by escaping any shell special characters in the Common LaTeX Service Interface (CLSI) root path.

The information disclosure flaw has not been addressed, but it can be mitigated by making some changes to the LaTeX configuration file located on the ShareLaTeX server.

ShareLaTeX was released as open source in February 2014, allowing users to run the service on their own servers. According to the official website, ShareLaTeX is used by more than 300,000 students and academics at major universities across the world.

ShareLaTeX developers encourage those who identify security issues to report them at [email protected]. The company’s security hall of fame currently includes the names of over 30 researchers.

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.