xmpp-http-upload
Affected
- introduced
0, fixed0.4.0(ecosystem)
Fixed versions
0.4.0
Fix
- Fixed version
0.4.0pip install --upgrade xmpp-http-upload==0.4.0
Advisory
Also known as: CVE-2020-15239, PYSEC-2020-158
Directory Traversal vulnerability in GET/PUT allows attackers to Disclose Information or Write Files via a crafted GET/PUT request
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
References
Low Basis: The source's own band: LOW
0, fixed 0.4.0 (ecosystem)0.4.0
0.4.0pip install --upgrade xmpp-http-upload==0.4.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0