Secret API Key is logged in cleartext
The Omise Python library logs the secret API key in cleartext when debug logging is enabled, so the key may end up in copied logs or recorded demonstrations.
- Triaged in 3 days
- Fixed in 4 months
- Paid in 4 months
- Disclosed after 5 months
Summary by the researcher
By @Sim4n6
The report
Summary:
While code-reviewing the repository https://github.com/omise/omise-python/, I have found that you log in clear-text some sensitive data.
Steps To Reproduce:
- Check here omise/request.py#L88 and here omise/request.py#L111
- The code source explicitly logs in debugging mode the secret API key.
logger.debug('Authorization: %s', self.api_key)
- Activate logging level debug and run the following sample.py file
import omise
omise.api_secret = 'skey_test_5sqdfyjv0rtqzs9f2x2'
customer = omise.Customer.create(
description='John Doe',
email='[email protected]'
)
You will get:

Impact
- sensitive data logged in clear text may end up in unusual places: recorded demonstrations, copied logs, etc.
Remediation
- I suggest you log at least a partial part of the secret API key if not remove the L88 and L111 in whole.
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
The library's request code includes a debug log statement that prints the full Authorization header, which contains the secret API key.
Impact
Sensitive data logged in clear text may end up in unusual places such as recorded demonstrations or copied logs, potentially exposing the secret API key.
What the attacker needed
Debug logging enabled; access to log output
The fix
The library should remove the debug log statements that print the full secret API key, or at most log a partial portion of it.
How it was found
- Review the request.py file at the linked lines.
- Observe that the code logs the secret API key in debug mode.
- Enable debug logging and run a sample script that creates a customer.
- See the secret API key appear in the log output.
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 secret API key is like a password that lets a program talk to a service. This library was writing that key into its debug log, a file that records what the program is doing. If that log is copied or recorded, the key may be exposed.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.