title: "Java JSF ViewState Deserialization" section: "Web Pentesting" sectionSlug: "pentesting-web" sourcePath: "src/pentesting-web/deserialization/java-jsf-viewstate-.faces-deserialization.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/pentesting-web/deserialization/java-jsf-viewstate-.faces-deserialization.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#
Java JSF ViewState Deserialization#
JavaServer Faces (JSF) may store view state in the client through the javax.faces.ViewState parameter. If the application accepts an unauthenticated serialized state without effective integrity protection, a crafted object graph can reach gadget classes on the server's classpath and lead to code execution during deserialization. Exploitability depends on the JSF implementation, its state-saving configuration, cryptographic protection, and available gadgets.[1]
The first reference explains the affected configurations and mitigations. The second walks through a practical assessment in which exposed configuration material enabled a protected ViewState to be reproduced.[1][2]