Executive brief
The eBay API MCP Server is a Node.js tool used to integrate with eBay's marketplace APIs. A vulnerability in its token management function allows attackers to inject arbitrary environment variables into the server's configuration file, potentially leading to OAuth flow hijacking, service outages, or remote code execution depending on the deployment environment.
Technical details
The vulnerability exists in the updateEnvFile function within src/auth/oauth.ts, which processes the ebay_set_user_tokens tool request. The function lacks input validation for newlines and special characters when appending or replacing values in the .env configuration file, allowing attackers to inject arbitrary environment variable declarations. The attack requires low-level authentication (PR:L) and network access (AV:N). An attacker can overwrite critical settings such as EBAY_REDIRECT_URI to hijack OAuth flows, inject invalid configuration to cause denial of service, or in certain deployment scenarios control environment variables like NODE_OPTIONS to achieve remote code execution. No patched version is currently available.
Affected products
- YosefHayim ebay-mcp through 1.7.2
Timeline
- 2026-02-19: disclosed: Advisory GHSA-97rm-xj73-33jh published
- 2026-02-21: advisory: CVE-2026-27203 assigned and published to NVD