November 13, 2026
The Unsigned Form Field That Ran Code on PayPal
A 2015 PayPal bounty shows why server-side state must never round-trip through the client as a raw serialized object

By Muhammad Asim Shahzad
2 min read
AI disclosure: This article was drafted with AI assistance as an analytical case study of a public disclosure. It is not my own discovery.
One hidden form field on a PayPal business site was enough to execute shell commands on its web servers. Michael Stepankin reported in December 2015 that manager.paypal.com accepted an unsigned, base64-encoded Java serialized object from the browser and deserialized it, a path to remote code execution and, he notes, production database access. PayPal fixed it promptly.
Disclaimer:_ Educational and defensive use only. The researcher reports PayPal fixed the issue promptly. This article intentionally omits reproduction details and payloads._
Vulnerability Overview
- Type: Insecure deserialization of untrusted data leading to remote code execution
- CWE (analytical mapping, not from the source): CWE-502
- CVE: Not reported
- Severity/CVSS: Not reported. Bounty: Not reported (the researcher says PayPal paid a bounty despite a duplicate; no amount given)
What Happened (high level)
While testing the application, Stepankin noticed a POST parameter that decoded into a complex binary structure. It was a Java serialized object with no signature, meaning the server would rebuild whatever object graph a client sent.
Java deserialization runs class-specific logic while reconstructing objects. If any library on the classpath contains a class whose deserialization hooks can be chained into dangerous behavior, an attacker can supply that graph and get code execution. Public research by Chris Frohoff and Gabriel Lawrence had already shown such chains in Apache Commons Collections, and a then-recent FoxGlove Security article had popularized the risk.
Stepankin confirmed command execution with a harmless out-of-band callback, read a single system file as proof, and stopped there. He later found other endpoints in the same application using serialized objects too. His report was marked duplicate: Mark Litchfield had reported a similar issue two days earlier.
My reading: the application used the client as a storage layer for server state, and trusted it on the way back.
Impact
Code execution on payment-adjacent web servers is about as severe as web bugs get. Per the researcher, the foothold could reach production databases behind the application, risking merchant data, lateral movement, and persistent backdoors inside a regulated environment.
Remediation & Defense-in-Depth (my own analysis)
1. Keep state on the server. Send an opaque random ID to the client and look the state up server-side.
2. If state must travel, use data formats, not object formats. JSON with a strict schema, signed with an HMAC, verified before any parsing.
3. Where Java deserialization is unavoidable, allowlist classes. Use a JEP 290 ObjectInputFilter that rejects everything not explicitly expected.
4. Shrink the gadget surface. Inventory and upgrade libraries; alert on deserialization exceptions.
# Pseudocode: verify-then-parse client state; never deserialize objects
SERVER_KEY = load_secret("form_state_hmac_key")
def issue_form_state(data: dict) -> str:
body = b64url(json_dumps(data, sort_keys=True))
mac = hmac_sha256(SERVER_KEY, body)
return body + "." + b64url(mac)
def read_form_state(token: str) -> dict:
try:
body, mac = token.rsplit(".", 1)
except ValueError:
raise Rejected("malformed state")
if not constant_time_equal(b64url_decode(mac), hmac_sha256(SERVER_KEY, body)):
raise Rejected("tampered state") # check before parsing
data = json_loads(b64url_decode(body)) # plain data, no classes
return validate_schema(data, FORM_STATE_SCHEMA)# Pseudocode: verify-then-parse client state; never deserialize objects
SERVER_KEY = load_secret("form_state_hmac_key")
def issue_form_state(data: dict) -> str:
body = b64url(json_dumps(data, sort_keys=True))
mac = hmac_sha256(SERVER_KEY, body)
return body + "." + b64url(mac)
def read_form_state(token: str) -> dict:
try:
body, mac = token.rsplit(".", 1)
except ValueError:
raise Rejected("malformed state")
if not constant_time_equal(b64url_decode(mac), hmac_sha256(SERVER_KEY, body)):
raise Rejected("tampered state") # check before parsing
data = json_loads(b64url_decode(body)) # plain data, no classes
return validate_schema(data, FORM_STATE_SCHEMA)Key Takeaways
- A serialized object from the client is code input, not data input.
- Signing or keeping state server-side removes the attack surface entirely.
- Duplicates happen; fixing every endpoint sharing the pattern matters more than the first report.
Credit & Sources
Research by Michael Stepankin: [manager.paypal.com] Remote Code Execution Vulnerability (25 January 2016; found December 2015). Discovered via Awesome-Bugbounty-Writeups index. Facts come from that post; analysis, code and remediation are original suggestions.
Next breakdown: another real bug bounty case. Follow @masimshahzad for daily bug bounty breakdowns.