Continuum

File Inclusion Vulnerability

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-2
  • Fix Version/s: 1.1-beta-3
  • Component/s: Security
  • Labels:
    None
  • Environment:
    Java version: 1.5.0_10
    OS name: "linux" version: "2.6.16.49-xen-osl4-ipsec-domu" arch: "i386"
  • Complexity:
    Intermediate
  • Number of attachments :
    2

Description

The value of the userDirectory variable used when calling workingCopy.action is not filtered properly. This gives anyone who can access workingCopy.action the ability to read any file on the file system with the permissions that jetty is running as.

For example, let's say we have continuum installed in /usr/local/continuum. Say we have a project named build-tools with a projectId of 10. Using the following URL, I can display the contents of /proc/version (see attached screenshot).

http://some-server.domain.com:8080/continuum/workingCopy.action?projectId=10&projectName=build-tools&userDirectory=../../../../../../../../../proc/&file=version

This is really bad if the user is running continuum as root because it gives the attacker access to every file on the file system.

Activity

Hide
Tom Cort added a comment -

Here's a patch that fixes the problem. It compiles, all unit tests pass, and continuum works. I tested adding a project and it correctly prevented me from use "../" in paths.

Show
Tom Cort added a comment - Here's a patch that fixes the problem. It compiles, all unit tests pass, and continuum works. I tested adding a project and it correctly prevented me from use "../" in paths.
Hide
Emmanuel Venisse added a comment -

Applied, thanks.

Show
Emmanuel Venisse added a comment - Applied, thanks.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: