skip to content

In Burp Suite's Decoder, what does a cookie that unwraps into readable fields show, and what does one that will not decode show?

level: middleimportance: should knowfreq 26%

answer

  1. encoding is not a lock
  2. readable means exposed to the holder
  3. unrecognised is not random
  4. a guess, not a verdict
  5. ask how the value is produced

basics

~20 s

A cookie that decodes into readable fields is merely encoded: URL, Base64 and hex have no key. A value that will not decode shows only that Decoder did not recognise it, not that it is random or protected.

solid answer

~40 s

Decoding is reading, never a security property. URL, HTML, Base64, hex and GZIP are keyless, reversible transformations, so a cookie that Smart decode unwraps into readable fields was only encoded, and anyone holding it can read it. Whether that is a finding depends on whether the server trusts those fields for a decision. The reverse is weaker still: a value Decoder cannot unwrap tells you only that no recognisable layer was found. It could be a random identifier, encrypted or signed data, a hash, or a format Decoder does not list, and Smart decode is a heuristic that can also guess wrong. To judge it you need to know how the application produces it, and for a value meant to be unpredictable you measure a sample of it.

go deeper

for a junior

Say that URL, Base64 and hex are reversible without a key, so a decoded cookie was never protected by its encoding.

for a middle

Separate the two conclusions: readable means the value was only encoded; unreadable means only that no recognisable layer was found, and Smart decode itself is a heuristic.

for a senior

Turn a decode into a defensible finding: name the field, the decision the server drives from it and the missing control, instead of reporting that something decoded.

for a principal

Set the reporting standard that an 'encrypted' or 'random' claim about an opaque value needs evidence of how it was produced, because the claim steers severity and remediation.

## Encoding is not protection Burp Suite's Decoder offers URL, HTML, Base64, ASCII hex, Hex, Octal, Binary and GZIP as its decode and encode functions. Every one of them is a **reversible transformation with no secret**. Their purpose is to carry data safely through a medium (a query string, an HTML page, a header) or to make it smaller, not to keep anyone from reading it. So the first thing Decoder teaches a reviewer is a negative: if a value unwraps with these functions, the application protected nothing by wrapping it. ## What a readable result tells you Say a reviewer examining a session cookie on a staging system at `example.internal` runs Smart decode and gets a few readable fields. What follows is narrow: - The value was **encoded**, not encrypted, so every holder of the cookie can read the fields. - The application keeps meaningful state in a value that travels through the client. - Nothing yet says that this is a vulnerability. Many readable values (a display language, a layout choice) are harmless. The finding exists when the **server trusts** a readable field for a decision about identity, role or price without keeping that state itself or protecting the value with a keyed integrity check or encryption. The reviewer's question for the owner is therefore not "can I decode this?" but "what does the server do with these fields when the cookie comes back?". The remedy sits on the application side (server-side state, or authenticated protection of the value), and how to apply it is the business of session-management owners. ## What an unreadable result tells you If Smart decode finds nothing, or ends in binary, the temptation is to call the value "encrypted" or "random". Neither follows. The table lists what the same observation is compatible with. | What the reviewer sees | Compatible explanations | |---|---| | No recognisable layer found | A random identifier; encrypted data; a hash; a format Decoder does not list; a corrupted copy | | Binary after one or two layers | Compressed data in another scheme; a binary serialisation; encrypted or random bytes | | Different result on a re-run | Data that varies per issue, such as a nonce, timestamp or counter, rather than evidence of randomness | Smart decode adds a second uncertainty. PortSwigger's page says it uses heuristics to recognise formats and can therefore make mistakes, so a value that decodes into plausible-looking text may also have been steered down the wrong path. Reading each layer's panel is how you catch that. ## Opaque is not unpredictable The Sequencer documentation makes the same point from the other side: data generated in a deterministic way can appear random. It names two examples, a well-designed linear congruential pseudo-random number generator and an algorithm that calculates the hash of a sequential number. A value that looks like noise to Decoder may therefore still be predictable by someone who knows how it was made. Decoding fails to explain it, and a statistical test may flatter it. Only knowing the construction settles the matter. ## Two short scenarios - **A readable cookie.** On a staging system at `example.internal`, Smart decode turns a cookie into three readable fields. The reviewer asks the owner which of the three the server reads back on later requests. Two are display preferences and one is a role name. The report is about the role field, with the decoded content as evidence, and says nothing about the other two. - **An unreadable cookie.** On the same system a second cookie yields nothing after Smart decode. The reviewer writes "not recognised by Decoder", asks how the value is produced and, being told it should be a random session identifier, collects a sample for Sequencer. The measurement and the owner's answer together support a conclusion; the failed decode alone supports none. ## What to do next 1. Record exactly which functions you applied and what Smart decode chose. 2. Ask the application owner how the value is produced, or read the code if the review includes it. 3. If the value is meant to be unpredictable, collect a sample and measure it with Sequencer, remembering that a clean statistical result is an indication and not proof. 4. For a readable value, identify which fields the server acts on, and report that as the finding, with the decoded content as evidence. ## Common slips - Calling Base64 or hex "encryption" because the text looks scrambled. - Reporting "encrypted" or "random" for a value Decoder could not unwrap. - Reporting every decodable cookie as a vulnerability without asking what the server trusts. - Accepting Smart decode's chain without reading the intermediate panels.

  • A reviewer writes that a cookie is encrypted because Smart decode ended in binary. What is wrong with that statement?
    Binary output shows only that the unwrapping stopped at bytes Decoder did not recognise. Those bytes could be compressed, a binary serialisation, random or encrypted. Telling them apart needs the producing code or configuration, or a measurement such as Sequencer for randomness, so the report should say 'not recognised', not 'encrypted'.
  • When is a cookie that decodes into readable fields not a finding?
    When the content is harmless and the server does not rely on it for any decision, such as a display preference. It becomes a finding when the server trusts a readable field for identity, role or price without server-side state or integrity protection. The report should name the field and the decision it drives.

Encoding is translating a letter into another script rather than locking it: anyone with the alphabet chart can read it. If you cannot read a letter, that shows you lack the chart, not that the letter was locked.

  • Calls Base64 or hex encryption because the value looks scrambled
  • Says a value Decoder cannot decode must be random and therefore safe
  • Treats Smart decode's chain as certain without reading each layer
  • Reports every decodable cookie as a vulnerability regardless of what the server trusts
  • Assumes a value that looks like a hash is secret even when its input is predictable