Review upload error messages for data exposure

30 September 2026

A monitor, keyboard, mouse, phone and headphones sit on a desk.
Illustrative photograph. Cropped and resized. Photo: “Black and white computer desk (Unsplash).jpg” — Oliur Rahman ultralinx / Wikimedia Commons. · CC0 1.0

An upload error should tell the caller what happened and what they can do next. A private bucket path or service-account name adds no value to that decision. Give the caller an opaque support reference and reserve the necessary diagnostic detail for a restricted operator view.

Write the response for the actual failure

Suppose an invalid test file triggers an exception that prints an internal storage path and worker identity in the response. If the service has established that the file is unreadable, the service could display “We could not read this PDF. Open the source file and export a fresh copy, then try again. If it still fails, quote reference U7M4.” Here U7M4 is an illustrative reference. If the service cannot tell whether the source is faulty, use a message that does not blame the file.

The operator may need the request time, failed stage, bounded reason code and the same reference. Avoid copying raw headers, document contents or entire exception strings into a general log. Keep necessary infrastructure details in a restricted destination, with access limited to the people who investigate that class of failure. OWASP’s logging guidance describes using interaction identifiers to connect related events.

Repeat the same failure on both sides

Submit the same harmless invalid PDF after the change. Inspect the visible message and the actual response body, including nested error details. If a client shows a clean message but its response still includes the private path, the original problem remains.

As a permitted operator, look up the support reference and verify that it leads to the right failure. As an ordinary user, check that knowing that reference does not open operator diagnostics. Record the input identifier, tested route, date, expected fields and observed fields with sensitive values removed.

Keep the case open if the caller can still see internal detail or support cannot use the corrected response to investigate the event.

Part of the Assess security controls for PDF uploads guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).