Exposed Zotero API Key Allows Unauthorized Write Access to Group Library
A Zotero API key was embedded in a publicly accessible repository file, granting unauthorised read and write access to a group library. An attacker could retrieve bibliographic data and add, modify, or delete notes and tags, risking data corruption.
Originally disclosed on Bugcrowd
- Accepted in 32 hours
- Fixed in 3 months
- Disclosed after 3 months
Summary by Sidhanta_Palei
Summary: Exposed API Key in Public Repository Leading to Unauthorized Zotero Group Library Access
Description
An exposed Zotero API key was identified within a publicly accessible file in the repository:
GES-DISC Reference Management System.
This API key grants unauthorized read and write access to a Zotero group library, potentially exposing the library to risks such as data corruption, unauthorized modifications, and potential data deletion.
Impact
The exposed API key allows an attacker to:
- Retrieve sensitive bibliographic data: Titles, DOIs, tags, and other metadata from the Zotero library.
- Modify library content: Add, update, or delete tags and notes without authorization.
- Potential data corruption: Unauthorized changes, such as adding arbitrary notes or tags, could compromise data integrity.
Reproduction Steps
-
Access the public repository:
The file contains a Zotero API key embedded within its code.
-
Retrieve library items: By using a Zotero library client or direct API call, bibliographic data (e.g., titles, DOIs, tags) can be fetched from the library without authentication.
-
Write unauthorized content: The key also allows creating or modifying library content, such as adding notes or tags to items.
Recommendations
-
Remove the exposed API key from the repository immediately.
-
Regenerate the API key in Zotero to invalidate the compromised one.
-
Adopt secure coding practices:
- Use environment variables or secure vaults for storing sensitive credentials.
- Regularly scan repositories for secrets using tools like GitGuardian or TruffleHog.
-
Audit the Zotero library for unauthorized changes, such as unrecognized notes, tags, or modifications.
-
Educate developers on the risks of hardcoding sensitive credentials in public or private repositories.
By addressing this issue promptly, the risk of data loss, unauthorized modifications, or misuse of the Zotero library can be mitigated.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a hardcoded API key committed to a public repository, exposing credentials that grant read and write access to the Zotero group library.
Impact
An attacker could read bibliographic metadata and add, update, or delete notes and tags, potentially causing data corruption or deletion.
What the attacker needed
Public repository access; no authentication needed
The fix
The exposed key should be removed from the repository and regenerated in Zotero, with credentials stored in environment variables or a secure vault and repositories scanned for secrets.
How it was found
- Access the public repository and find the file containing the embedded Zotero API key.
- Use a Zotero client or direct API call with the key to fetch bibliographic data such as titles, DOIs, and tags.
- Use the same key to create or modify library content, such as adding notes or tags to items.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
An API key is like a password that lets a program talk to a service. Here, that key was left in a public code repository, so anyone could use it to read and change the Zotero library it belongs to.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.