Full Path disclosure on 500 error
A cookie whose name began with a particular prefix and whose value was not valid JSON caused the server to return a 500 error containing a full Python traceback. An attacker could use this to learn internal file paths and library versions on the server.
Originally disclosed on HackerOne
- Disclosed after 6 hours
On manipulating cookie
- parameter:
gitHub_<anything>500 error returned with path disclosing of Python Files.
##Error Below:
Traceback (most recent call last): File "/opt/python/run/venv/local/lib/python3.6/site-packages/state_chain.py", line 328, in loop new_state = function(**deps.as_kwargs) File "/opt/python/run/venv/local/lib/python3.6/site-packages/pando/state_chain.py", line 128, in render_response output = resource.render(context, state['dispatch_result'], state['accept_header']) File "/opt/python/run/venv/local/lib/python3.6/site-packages/aspen/http/resource.py", line 129, in render return self.render_for_type(available[0], context) File "/opt/python/run/venv/local/lib/python3.6/site-packages/aspen/simplates/simplate.py", line 140, in render_for_type exec(self.page_two, context) File "/opt/python/bundle/4/app/www/on/%platform/associate.spt", line 36, in <module> cookie_obj = json.loads(b64decode_s(cookie_value)) File "/usr/lib64/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 98 (char 97)
Impact
Information is being disclosed about internal files.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application decoded a cookie value as JSON without handling malformed input, and the framework returned a debug traceback to the client instead of a generic error page.
Impact
Internal file paths and library versions are disclosed in the error response.
What the attacker needed
Ability to set a cookie value
How it was found
- Add or modify a cookie whose name starts with the given prefix.
- Manipulate the cookie value.
- Send the request and observe the 500 error with the traceback.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A cookie is a small piece of data a website stores in your browser and sends back on each request. Here, changing the cookie's name and value made the server crash and show its internal error details, including file paths on the server. Those details help an attacker plan further attacks.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.