Gitbook API endpoint security #298
-
I've realized that the AI search endpoint https://api.gitbook.com/v1/spaces/{spaceId}/search/ask returns factual responses even without any authentication. Anyone that gets hold of the space id will be able to search through the information. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @binathperera 👋 This API endpoint should be properly secured and only return an answer if you can access the space (space is public or your request is authenticated as a user who can access the space). Can you reach out to our support (support @ gitbook.com) with the space IDs / API tokens you are using to reproduce the potential security issue? Note that if the space is published publicly, then the endpoint can be used without authentication (like anyone loading the published webpage can use Lens from the UI). |
Beta Was this translation helpful? Give feedback.
@binathperera We fixed a cache issue that might be the origin of the problem. Can you try again and let us know if it's still happening?