Skip to content
Path traversal Disclosed report Intermediate

jitsi-call-analytics: Unauthenticated arbitrary file write via path traversal in `/api/v1/uploads/analyze`

The upload handler on the analyse endpoint used the user-supplied original filename directly when building a file path, so traversal sequences could escape the per-session directory. An unauthenticated attacker could therefore write or overwrite files anywhere beneath the configured downloads root.

r1skr1der Follow

Originally disclosed on HackerOne

Bounty$100 Low View original
  • Triaged in 22 hours
  • Fixed in 55 days
  • Paid in 3 days
  • Disclosed after 6 months

Summary by the program

The jitsi-call-analytics backend contained a path traversal vulnerability in the /api/v1/uploads/analyze endpoint that allowed unauthenticated users to write files within the configured RTCSTATS_DOWNLOADS_PATH directory. The upload handler used user-controlled file.originalname directly in path.join() without sanitization, enabling attackers to include ../ sequences to escape the intended per-session UUID directory and write or overwrite files anywhere under the configured root path.

Changes:

The fix has been deployed to production instances.

We thank @r1skr1der for submitting this report to us.

The original report as published on HackerOne, by r1skr1der. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is the jitsi-call-analytics backend, and the asset listed for the report is https://github.com/jitsi. The vulnerable feature is the file upload handler behind the /api/v1/uploads/analyze endpoint, which accepts uploads and stores them under a directory configured through RTCSTATS_DOWNLOADS_PATH.

The researcher, r1skr1der, found that the handler took the user-controlled file.originalname value and passed it straight into path.join() without sanitisation. Because the filename was not cleaned, an attacker could include ../ sequences in it and escape the intended per-session UUID directory, writing or overwriting files anywhere beneath the configured root path. The endpoint required no authentication, so the write was reachable by an unauthenticated user.

The issue was rated low severity and a bounty of 100.00 USD was paid. The fix is recorded in a pull request:

Text
fix(security) Prevent path traversal in file upload handler.
https://github.com/jitsi/jitsi-call-analytics/pull/56

The program states that the fix has been deployed to production instances. The report does not include the request that was sent, the exact payload used, or the server responses observed.

Root cause

The mistake is a classic trust boundary failure: a value that the client fully controls, the original filename in a multipart upload, is treated as a safe path component. The handler likely built the destination path by joining a base directory, a per-session UUID directory and the client-supplied filename, and path.join() normalises ../ segments rather than rejecting them. A filename such as one containing ../ therefore resolves outside the per-session directory while still sitting under the configured root. The report does not show the surrounding code, so the exact construction is inferred from the described behaviour.

Impact

Within the scope the report describes, an unauthenticated attacker could write files anywhere under RTCSTATS_DOWNLOADS_PATH and could overwrite existing files there. The report does not claim code execution, access outside that root, or any effect on other services. The practical risk depends on what the application later does with files in that directory, which the report does not describe.

How this kind of bug works

Path traversal appears wherever an application builds a filesystem path from untrusted input. The dangerous pattern is concatenation or joining of a fixed base with a user-supplied fragment, followed by use of the result in a file operation. Normalisation routines collapse .. segments, so a value that looks like a filename can walk up the directory tree. Encoded forms (%2e%2e%2f), doubled separators, backslashes on Windows, and absolute paths are all variants of the same idea.

Uploads are a common home for this because the filename is metadata the client chooses freely and developers often assume it is harmless. The same class shows up in download and export endpoints, archive extraction, template and log file naming, cache keys mapped to disk, and any parameter that ends up in a path.

Defences work best in layers: never use client filenames as paths, generate server-side names (a UUID plus a validated extension), resolve the final path and verify it is still inside the intended base directory, reject or strip separators and dot segments, and apply least privilege to the process so a successful write is contained.

How to test for it

  1. Identify endpoints that accept file uploads or name files: multipart forms, import and export features, report generators, avatar and attachment handlers.
  2. Note the filename field in the multipart body. It is the usual injection point, separate from the file content.
  3. Send a benign upload first and observe where the file lands, if the application reveals a path or download link.
  4. Replace the filename with traversal sequences that climb one or more levels, using both plain and encoded forms, and vary separators.
  5. Look for a positive signal: the response references a path outside the expected directory, a subsequent request retrieves the file from an unexpected location, or a file you know exists is overwritten.
  6. Test overwrite separately from creation, since overwriting a known file is often easier to prove than reading back a new one.

Common false positives: the server sanitises the name but still echoes the original in a response; the write succeeds only inside the intended directory; the application stores files in a database and the path is cosmetic; or the traversal is blocked by the filesystem permissions of the service account. Confirm the effect with a second request rather than trusting a reflected filename.

How it is fixed

The standard fix is to stop deriving paths from client input. Generate the stored filename on the server, keep only a validated extension from the original, and store metadata separately. Where the original name must be preserved for display, keep it as data and never as a path. Additionally, resolve the final path and check that it remains within the intended base directory before any write, reject names containing separators or dot segments, and run the service with minimal filesystem permissions. The fix is recorded as fix(security) Prevent path traversal in file upload handler.

Hunting notes

This bug class hides in features that feel incidental: analytics ingestion, log and stats collection, bulk import, attachment handling, and anything that names files after user input. Recon signals include endpoints with upload, analyze, import or export in the path, multipart forms whose filenames are reflected, and applications that expose a downloads directory. When you find a candidate, demonstrate a concrete effect: a file created outside the expected directory, or a known file overwritten, with the request and response that prove it. Programs accept traversal reports far more readily when the impact is shown rather than asserted, and when the write stays within the documented root, expect the severity to be rated accordingly.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

The target is jitsi-call-analytics, a Jitsi backend. That backend has a feature that accepts uploaded files through a web address ending in /api/v1/uploads/analyze. The files are stored in a folder on the server, and the location of that folder is set through a configuration value named RTCSTATS_DOWNLOADS_PATH.

A security researcher named r1skr1der found that this upload feature trusted the filename sent by whoever uploaded the file. When a browser uploads a file, it sends the file's name along with its contents. The server code took that name and used it directly to build the place where the file would be saved, without cleaning it first. Because of that, someone could put special characters in the filename that mean "go up one folder" and make the server save the file somewhere it was not supposed to go.

This is called a path traversal. A simple comparison: imagine a hotel clerk who is told "put this parcel in room 12" and does exactly that, even if the note says "room 12, then go up the stairs and into the manager's office". The clerk follows the directions literally instead of staying in the guest area. Here, the server followed the filename literally instead of keeping the file inside the folder meant for it.

The upload address did not ask for a login. Anyone who could reach the server could try this, without an account. The issue was rated low severity and a bounty of 100.00 USD was paid. The fix is recorded in a pull request:

Text
fix(security) Prevent path traversal in file upload handler.
https://github.com/jitsi/jitsi-call-analytics/pull/56

The program says the fix has been deployed to production instances. The report does not include the request that was sent, the exact payload used, or the server responses observed.

Why it happened

When a web page uploads a file, the browser sends it in a format called multipart. Alongside the file's contents, the browser includes the file's original name, for example holiday.jpg. That name is chosen by the client, which means an attacker can choose anything they like.

The server code took that name and passed it into a function called path.join(). This function builds a file path by gluing pieces together, such as a base folder, a folder named after the session, and the filename. It also tidies up the result, and part of that tidying is interpreting ../ as "go up one level in the folder tree". So a filename containing ../ could climb out of the session folder while still ending up somewhere under the configured root folder.

The report does not show the surrounding code, so the exact way the path was built is inferred from the described behaviour. What is clear is the core mistake: a value fully controlled by the client was treated as a safe piece of a file path.

What an attacker could do

Within the scope the report describes, an unauthenticated attacker could write files anywhere under RTCSTATS_DOWNLOADS_PATH and could overwrite existing files there. The report does not claim code execution, access outside that root, or any effect on other services. The practical risk depends on what the application later does with files in that directory, which the report does not describe.

In general, how this kind of bug works

Path traversal appears wherever an application builds a file path from input it does not trust. The dangerous pattern is joining a fixed base folder with a user-supplied fragment and then using the result in a file operation. The tidying step collapses .. segments, so a value that looks like a filename can walk up the folder tree. Encoded forms such as %2e%2e%2f, doubled separators, backslashes on Windows, and absolute paths are all variants of the same idea.

Uploads are a common home for this because the filename is information the client chooses freely, and developers often assume it is harmless. The same class shows up in download and export features, archive extraction, template and log file naming, cache keys mapped to disk, and any parameter that ends up in a path.

Defences work best in layers: never use client filenames as paths, generate server-side names (a UUID plus a validated extension), resolve the final path and verify it is still inside the intended base folder, reject or strip separators and dot segments, and give the process as few filesystem permissions as it needs so a successful write is contained.

In general, how to test for it

  1. Identify features that accept file uploads or name files: multipart forms, import and export features, report generators, avatar and attachment handlers.
  2. Note the filename field in the multipart body. It is the usual injection point, separate from the file content.
  3. Send a harmless upload first and observe where the file lands, if the application reveals a path or download link.
  4. Replace the filename with traversal sequences that climb one or more levels, using both plain and encoded forms, and vary separators.
  5. Look for a positive signal: the response references a path outside the expected folder, a later request retrieves the file from an unexpected location, or a file you know exists is overwritten.
  6. Test overwrite separately from creation, since overwriting a known file is often easier to prove than reading back a new one.

Common false positives: the server cleans the name but still echoes the original in a response; the write succeeds only inside the intended folder; the application stores files in a database and the path is cosmetic; or the traversal is blocked by the filesystem permissions of the service account. Confirm the effect with a second request rather than trusting a reflected filename.

In general, how it is fixed

The standard fix is to stop deriving paths from client input. Generate the stored filename on the server, keep only a validated extension from the original, and store metadata separately. Where the original name must be preserved for display, keep it as data and never as a path. Additionally, resolve the final path and check that it remains within the intended base folder before any write, reject names containing separators or dot segments, and run the service with minimal filesystem permissions. The fix is recorded as fix(security) Prevent path traversal in file upload handler.

In general, where to look

This bug class hides in features that feel incidental: analytics ingestion, log and stats collection, bulk import, attachment handling, and anything that names files after user input. Recon signals include addresses with upload, analyze, import or export in the path, multipart forms whose filenames are reflected, and applications that expose a downloads folder. When you find a candidate, demonstrate a concrete effect: a file created outside the expected folder, or a known file overwritten, with the request and response that prove it. Programs accept traversal reports far more readily when the impact is shown rather than asserted, and when the write stays within the documented root, expect the severity to be rated accordingly.

Glossary

  • Backend: the part of a service that runs on the server and does the work behind the scenes, as opposed to what you see in the browser.
  • Endpoint: a specific web address that a service responds to, such as /api/v1/uploads/analyze.
  • Request: a message a browser or program sends to a server asking it to do something.
  • Response: the message the server sends back after a request.
  • Authentication: proving who you are, usually by logging in. An unauthenticated request is one made without logging in.
  • Path traversal: a bug where input containing ../ or similar makes the server reach files or folders outside the intended location.
  • path.join(): a programming function that builds a file path from pieces and tidies up .. segments.
  • Multipart: the format browsers use to send a file upload, carrying the file's contents plus its original name.
  • file.originalname: the filename as sent by the client, which the client can set to anything.
  • UUID: a long random identifier, often used to name folders or files so they cannot be guessed.
  • Sanitisation: cleaning input so that dangerous characters or sequences are removed or neutralised.
  • Root path: the base folder under which files are meant to be stored.
  • Overwrite: replacing an existing file with a new one of the same name.
  • Severity: a rating of how serious a bug is, often from low to critical.
  • Bounty: a reward paid to a researcher for reporting a valid security issue.
  • Pull request: a proposed change to code, reviewed before it is merged into the project.
  • Code execution: a far more serious outcome where an attacker makes the server run their own code.
  • Least privilege: giving a program only the permissions it needs to do its job, so damage is limited if it is abused.
  • False positive: a finding that looks like a bug but is not actually exploitable.

More from 8x8

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.