The vulnerability, identified as GHSA-ghfh-fmx4-26h8, lies in OpenBao's audit logging system. Specifically, the system failed to properly redact (HMAC) the HTTPRawBody field in audit logs for certain endpoints, such as those used by the ACME and OIDC features. This resulted in the leakage of potentially sensitive information, like ACME challenge codes and OIDC claims, into the audit logs.
The root cause of the vulnerability was a flawed and overly complex implementation of the data hashing mechanism within the audit package. The system used a two-copy approach, where it would traverse an original data structure while attempting to modify a separate, JSON-unmarshaled copy. This process was error-prone and failed to correctly handle fields of type []byte, such as HTTPRawBody.
The patch addresses this by refactoring the entire hashing logic. The key change was to abandon the two-copy approach in favor of operating on a single data structure. This simplification is evident in the changes to the HashResponse, HashStructure, and hashMap functions in audit/hashstructure.go.
audit.HashResponse is the primary function responsible for preparing the response for logging. It was failing to ensure HTTPRawBody was in a hashable format. audit.HashStructure contained the buggy recursive logic. By identifying these functions, we can pinpoint the exact locations in the code that would be exercised during the exploitation of this vulnerability, making them key indicators in a runtime profile.