# Hardcoded signing and cookie secrets

Static or default keys signing sessions, tokens, or reset links, letting anyone forge identities

_Area: Web authentication and account takeover. Seen in 6 disclosed reports; 3 confirmed bounties, median $90,000, range $1,500-$90,000; latest 2026-10-12. Updated 2026-10-23._

## How it works
A signing secret is only a boundary if it is secret. When the key that signs a session cookie, token, or reset link is hardcoded, shipped in source, or falls back to a default, the signature stops proving anything: anyone who reads the key can mint a valid artifact for any user. The assumption that breaks is "only the server knows this key." If the key is in the binary, the repo, or a fallback constant, the attacker knows it too and the signature becomes a formality [E2](https://bugbountylibrary.com/r/blog%3Aian-sh-redash.md)[E4](https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-exploiting-hardcoded-keys-to-achieve-rce-in-yellowfin-bi.md)[E5](https://bugbountylibrary.com/r/h1%3A1380121.md).

## Where it shows up
- Framework secret keys with a default/fallback value when config is missing (Flask SECRET_KEY, cookie secrets) [E2](https://bugbountylibrary.com/r/blog%3Aian-sh-redash.md)[E5](https://bugbountylibrary.com/r/h1%3A1380121.md)
- Secrets embedded in shipped source or binaries: RSA signing keys, AES cookie keys, JWT secrets, AES key+IV constants [E3](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-active-exploitation-gladinet-centrestack-triofox-insecure-cryptography-vulnerability.md)[E4](https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-exploiting-hardcoded-keys-to-achieve-rce-in-yellowfin-bi.md)
- The same key reused across sessions, reset tokens, invites, and email confirmations [E2](https://bugbountylibrary.com/r/blog%3Aian-sh-redash.md)[E5](https://bugbountylibrary.com/r/h1%3A1380121.md)
- Signed-but-not-encrypted cookies carrying serialized objects or secrets inside the payload [E1](https://bugbountylibrary.com/r/blog%3Asimonkoeck-com-writeups-google-devsite-flask-session-pickle-rce.md)
- Tokens keyed on sequential user IDs rather than random values [E2](https://bugbountylibrary.com/r/blog%3Aian-sh-redash.md)

## How to review
Find every place a signature, cookie, or token is verified, and trace where its key comes from. The invariant: the signing key must be unique per deployment, generated at runtime or supplied by config with no usable default, and never present in source, binaries, or client-visible data. Check that a missing key fails closed rather than falling back. Confirm reset/invite tokens are not keyed on guessable IDs. For signed cookies, decode the payload and check nothing sensitive (especially the signing key itself) sits inside [E1](https://bugbountylibrary.com/r/blog%3Asimonkoeck-com-writeups-google-devsite-flask-session-pickle-rce.md).

## Variants seen
- Static Flask SECRET_KEY fallback forging reset tokens for user ID 1 [E2](https://bugbountylibrary.com/r/blog%3Aian-sh-redash.md)
- Weak/static REDASH_COOKIE_SECRET and REDASH_SECRET_KEY forging sessions and reset tokens [E5](https://bugbountylibrary.com/r/h1%3A1380121.md)
- Hardcoded RSA/AES/JWT keys in shipped Java source enabling pre-auth session forgery [E4](https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-exploiting-hardcoded-keys-to-achieve-rce-in-yellowfin-bi.md)
- Hardcoded AES key and IV constants producing forgeable access tickets [E3](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-active-exploitation-gladinet-centrestack-triofox-insecure-cryptography-vulnerability.md)
- OAuth client_secret reused as the cookie signing key and embedded in the signed cookie [E1](https://bugbountylibrary.com/r/blog%3Asimonkoeck-com-writeups-google-devsite-flask-session-pickle-rce.md)

## Impact and severity
Led to admin account takeover and, in several cases, remote code execution via deserialization or injection after forgery [E1](https://bugbountylibrary.com/r/blog%3Asimonkoeck-com-writeups-google-devsite-flask-session-pickle-rce.md)[E3](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-active-exploitation-gladinet-centrestack-triofox-insecure-cryptography-vulnerability.md)[E4](https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-exploiting-hardcoded-keys-to-achieve-rce-in-yellowfin-bi.md). Severity is critical: pre-auth forgery of any identity. It worsens when one key signs many artifact types and when forged sessions reach deserialization or datasource-connector sinks [E1](https://bugbountylibrary.com/r/blog%3Asimonkoeck-com-writeups-google-devsite-flask-session-pickle-rce.md)[E4](https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-exploiting-hardcoded-keys-to-achieve-rce-in-yellowfin-bi.md).

## Evidence
- E1: https://bugbountylibrary.com/r/blog%3Asimonkoeck-com-writeups-google-devsite-flask-session-pickle-rce.md
- E2: https://bugbountylibrary.com/r/blog%3Aian-sh-redash.md
- E3: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-active-exploitation-gladinet-centrestack-triofox-insecure-cryptography-vulnerability.md
- E4: https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-exploiting-hardcoded-keys-to-achieve-rce-in-yellowfin-bi.md
- E5: https://bugbountylibrary.com/r/h1%3A1380121.md
