Looking for the vulnerability index of Invicti's legacy products?
Apache Tapestry weak secret key - Vulnerability Database

Apache Tapestry weak secret key

Description

Apache Tapestry uses a cryptographically signed field named "t:formdata" to store serialized Java objects for Form components. This signature mechanism relies on a secret key (HMAC_PASSPHRASE) to prevent tampering. The application is currently configured with a weak, default, or publicly known secret key, which allows attackers to forge valid signatures and manipulate the serialized data.

Remediation

Replace the weak HMAC_PASSPHRASE with a strong, cryptographically random secret key. Generate a random string of at least 32 characters using a secure random generator and configure it in your Tapestry application:

1. Generate a strong secret key using a cryptographically secure method
2. Update your AppModule.java or application configuration:

public static void contributeApplicationDefaults(
    MappedConfiguration<String, String> configuration) {
    configuration.add(SymbolConstants.HMAC_PASSPHRASE, 
        "your-long-random-secret-key-here");
}

3. Ensure the secret key is stored securely (e.g., environment variables, secure configuration management) and never committed to version control
4. Restart the application to apply the changes
5. Rotate this key periodically as part of your security maintenance procedures

Related Vulnerabilities