# GHSA-CJF2-QM67-6HH8: Path traversal in data-provider allows reading classpath JSON files

- Database: GitHub
- Severity: CVSS 4.3 (Medium)
- Published: 2026-10-19
- Modified: 2026-10-19

## Affected versions

- com.ritense.valtimo:data-provider (Maven): from 4.15.3, fixed in 13.50.0

## Description

### Summary

`DropdownJsonFileDataProvider` and `TranslationJsonFileDataProvider` insert the user-supplied `key` query parameter into a classpath resource path without validating it. Path traversal sequences (`../`) let an authenticated user read any `.json` file on the application classpath.

### Impact

Any authenticated user (`ROLE_USER` is sufficient) can read `.json` files outside the intended `config/dropdown` and `config/translation` folders, for example:

```
GET /api/v1/data/translation?key=../../META-INF/spring-configuration-metadata
GET /api/v1/data/translation/all?key=../../META-INF/spring-configuration-metadata
```

Reachable files include bundled form, case, dashboard and permission definitions, plugin configuration and third-party library metadata. The same flaw exists on the `dropdown-list` category. There the response is HTTP 500 for files that are not a string map, but the file has already been opened and parsed.

The impact is constrained by:
- Only files with a `.json` extension are readable (the suffix is appended by the application)
- Traversal is limited to the classpath, not the filesystem
- Authentication is required
- The access is read-only; POST and DELETE on these endpoints require the admin role

### Affected code

- `com.ritense.dataprovider.defaultdataproviders.providers.dropdown.DropdownJsonFileDataProvider#get` (`classpath:config/dropdown/$key.json`)
- `com.ritense.dataprovider.defaultdataproviders.providers.translation.TranslationJsonFileDataProvider#getTranslations` (`classpath:config/translation/$language.json`)

Reachable through `GET /api/v1/data/{category}` and `GET /api/v1/data/{category}/all` for the `dropdown-list` and `translation` categories.

### Patches

Fixed in 13.50.0. The path is now normalised and the request is treated as "not found" unless the resolved path still lies inside `config/dropdown/` or `config/translation/` (`ClasspathJsonResourceResolver`). Fixes are not backported; upgrade to 13.50.0 or later.

### Workarounds

If you cannot upgrade yet, reject requests to `/api/v1/data/*` whose `key` query parameter contains `..`, `%2e%2e` or backslashes, for example with a reverse proxy or WAF rule.

### Remediation for developers

Resolve the final path and verify it stays inside the intended base directory (the shipped fix). Optionally also restrict `key` to `^[a-zA-Z0-9_-]+$` in `DataProviderConstants.getQueryKey()` as an additional layer.

### Credit

Reported by an external penetration test.

## References

- https://github.com/valtimo-platform/valtimo/security/advisories/GHSA-cjf2-qm67-6hh8

Page: https://cve.now/GHSA-CJF2-QM67-6HH8

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
