Skip to main content
Menu
Advisories

GitHub access token disclosure in VoloDocs document responses

GHSA-52J7-67FX-VPGQPublished Updated GitHub

Description

Volo.Docs.Application copies project extra properties into document responses without filtering private values. A GitHub access token configured for the project is returned as project.extraProperties.GitHubAccessToken.

Details

The document endpoints in Volo.Docs.HttpApi, GET /api/docs/documents and GET /api/docs/documents/default, do not require login by themselves. When these endpoints are publicly accessible, an anonymous caller can retrieve the configured token by requesting a readable document. A configured token and a retrievable document are required. A host-level authorization policy can limit access to these endpoints.

Clearing private properties only in the project service does not protect document responses.

Patches

Fixed in 10.6.3 and 10.7.1. The 11.0.0-rc.1 preview does not include the fix.

The fix copies only explicitly allowed public properties in both public project mappings. Other project extra properties are no longer returned by the public project DTO. Applications that use additional properties from that DTO need to keep private configuration on the server and review any fields they expose publicly.

Upgrade all Volo.Docs.* packages to the same patched version.

Workarounds

If you cannot upgrade yet:

  • Restrict or disable HTTP endpoints that return document details, including GET /api/docs/documents and GET /api/docs/documents/default. Clients that use these endpoints will no longer be able to fetch documents through them.
  • Override the public project mappings to copy only known public properties. Apply the same restriction to projects embedded in document responses; filtering only the project API is not sufficient.
  • Revoke exposed GitHub tokens and replace them after stopping the disclosure. Review other sensitive project extra properties and rotate exposed credentials. Replacing a token while the response still exposes it also exposes the replacement.

References

Proof of concept

  1. Configure a Docs project that uses the GitHub document store and set a GitHub access token for it (stored in the project's GitHubAccessToken extra property).
  2. Without signing in, request a document the project can serve, for example: GET /api/docs/documents/default?projectId={projectId}&languageCode=en&version={version}
  3. The JSON response contains the configured token in project.extraProperties.GitHubAccessToken.

The reporter used a harmless marker value instead of a real token and did not test a live deployment.

Impact

The impact depends on the exposed token's permissions. Private repository access can expose private source code, and write permissions can allow repository changes within the token owner's access. Other sensitive values stored in the project's extra properties can also be returned.

Affected versions

References

GitHub · abpframework/abp