The vulnerability, GHSA-c82x-f4xr-qv33, describes an unauthenticated REST API for writing patient records in the epa4all-client service. The advisory points to a pull request (#43) which only contains updates to README files, warning users about the lack of authentication and the need to secure the service in a trusted environment. This indicates the vulnerability is not a flaw in a specific line of code that was patched, but rather a fundamental design issue: the absence of authentication for critical functions.
To identify the vulnerable functions, I analyzed the service's API specification, openapi.yaml. This file defines the available REST endpoints and their corresponding operationIds, which typically map to method names in the controller code.
The openapi.yaml reveals two critical endpoints for writing data:
POST /documents with operationId: writeDocument for creating new documents.
POST /documents/{id} with operationId: replaceDocument for replacing existing documents.
These operations directly handle the writing and modification of patient health records. Since the vulnerability is the complete lack of authentication for these actions, the methods that implement these operations are the vulnerable functions. Based on standard Java project structure and the operationIds, the vulnerable functions are writeDocument and replaceDocument within the com.oviva.telematik.epa4all.rest.api.PhrDocumentsApi class. An attacker exploiting this vulnerability would directly call these endpoints, and these function names would appear in runtime profiles or stack traces.