Skip to content

Directory Traversal vulnerability in GET/PUT allows attackers to Disclose Information or Write Files via a crafted GET/PUT request

Low severity GitHub Reviewed Published Oct 6, 2020 in horazont/xmpp-http-upload • Updated Jan 9, 2023

Package

pip xmpp-http-upload (pip)

Affected versions

< 0.4.0

Patched versions

0.4.0

Description

Impact

Information Disclosure

When the GET method is attacked, attackers can read files which have a .data suffix and which are accompanied by a JSON file with the .meta suffix. This can lead to Information Disclosure and in some shared-hosting scenarios also to circumvention of authentication or other limitations on the outbound (GET) traffic.

For example, in a scenario where a single server has multiple instances of the application running (with separate DATA_ROOT settings), an attacker who has knowledge about the directory structure is able to read files from any other instance to which the process has read access.

If instances have individual authentication (for example, HTTP authentication via a reverse proxy, source IP based filtering) or other restrictions (such as quotas), attackers may circumvent those limits in such a scenario by using the Directory Traversal to retrieve data from the other instances.

File Write

If the associated XMPP server (or anyone knowing the SECRET_KEY) is malicious, they can write files outside the DATA_ROOT. The files which are written are constrained to have the .meta and the .data suffixes; the .meta file will contain the JSON with the Content-Type of the original request and the .data file will contain the payload.

Patches

PR #12 fixes the issue. The PR has been merged into version 0.4.0 and 0.4.0 has been released and pushed to PyPI. Users are advised to upgrade immediately.

Workarounds

  • Apache can apparently be configured to filter such malicious paths when reverse-proxying.
  • There are no other workarounds known.

References

References

@horazont horazont published to horazont/xmpp-http-upload Oct 6, 2020
Reviewed Oct 6, 2020
Published to the GitHub Advisory Database Oct 6, 2020
Last updated Jan 9, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N

EPSS score

0.073%
(32nd percentile)

Weaknesses

CVE ID

CVE-2020-15239

GHSA ID

GHSA-hwv5-w8gm-fq9f

Source code

No known source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.