Back to skill

Security audit

Buffer Social Media

Security checks for vulnerabilities and agentic risk

Overview

This Buffer posting skill is coherent, but needs Review because it handles a live Buffer API key and can send that key to an unrestricted configured API URL.

Review before installing. Use only a Buffer API key you are comfortable granting to this tool, keep BUFFER_API_URL fixed to Buffer's official HTTPS API, add .env to .gitignore before storing secrets locally, avoid --all until you have verified profile IDs, prefer drafts or queueing for testing, and update the flagged dependencies.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
lib/config.js:11
Finding
Buffer Bearer Credential Can Be Redirected to an Arbitrary or Insecure Endpoint## Vulnerability Details **File Location**: `lib/config.js:11-15` and `lib/buffer-api.js:86-102` **Vulnerability Type**: Unrestricted credential destination and missing transport validation **Risk Level**: High ### Vulnerable Code `lib/config.js:11-15`: ```js export function getConfig() { return { apiKey: process.env.BUFFER_API_KEY, apiUrl: process.env.BUFFER_API_URL || DEFAULT_API_URL, }; } ``` `lib/buffer-api.js:86-102`: ```js constructor(config, httpClient) { this.apiKey = config.apiKey; this.apiUrl = config.apiUrl; this.http = httpClient || axios.create({ baseURL: this.apiUrl, timeout: HTTP_TIMEOUT_MS, headers: { Authorization: `Bearer ${this.apiKey}`, 'Content-Type': 'application/json', }, }); } ``` ### Technical Analysis The application accepts `BUFFER_API_URL` directly from the process environment without validating its scheme, hostname, port, or embedded credentials. The resulting value becomes the Axios base URL, while the Buffer API key is unconditionally attached as a bearer token to every request. Consequently, a malicious or accidentally modified environment configuration can redirect requests and the associated Buffer credential to an arbitrary server. The code also permits an `http://` endpoint, which would expose the token and requested content over an unencrypted connection. Custom API endpoints can be useful for testing, but sending a production credential to an unrestricted destination exceeds the minimum network privileges required for the declared functionality. Normal operation only requires authenticated communication with Buffer's official HTTPS API. ### Attack Path 1. An attacker modifies the user's `.env`, shell environment, deployment configuration, or automation settings. 2. The attacker sets `BUFFER_API_URL` to an attacker-controlled endpoint, such as `https://attacker.example/coll ...[truncated 1231 chars]
Remediation
## Remediation Suggestions 1. Parse the configured endpoint with the standard `URL` class before creating the HTTP client. 2. Require the `https:` scheme and reject cleartext HTTP. 3. Restrict production requests to an explicit allowlist, preferably exactly `api.buffer.com`. 4. Reject URLs containing embedded usernames or passwords, unexpected ports, fragments, or unsupported paths. 5. Use the official endpoint as a fixed production constant, such as `https://api.buffer.com/graphql`, rather than exposing an unrestricted runtime override. 6. If custom endpoints are necessary for tests, require an explicit development-only opt-in and prohibit the use of production credentials. 7. Add tests confirming that non-HTTPS URLs, unexpected hostnames, and malformed URLs are rejected before an authenticated request is made. 8. Consider checking redirect behavior so that authorization headers cannot be forwarded to an untrusted redirect destination.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:13
Finding
Documented Secret Storage Lacks Repository Exclusion Protection## Vulnerability Details **File Location**: `SKILL.md:13-16` and `README.md:36-40`; the referenced `.env.example` and expected `.gitignore` are absent from the audited project **Vulnerability Type**: API credential exposure through unsafe local secret-file guidance **Risk Level**: Medium ### Vulnerable Documentation `SKILL.md:13-16`: ```md 2. Configure API key: ```bash cp .env.example .env # set BUFFER_API_KEY ``` ``` `README.md:36-40`: ```md ```bash cd skills/buffer npm install cp .env.example .env # Add your BUFFER_API_KEY to .env ``` ``` ### Technical Analysis The installation instructions direct users to store a live Buffer API credential in a project-local `.env` file. However, the audited artifact does not include the referenced `.env.example` file or a `.gitignore` file that excludes `.env`. The project PRD describes both files as part of the intended secure setup, but they are absent from the supplied directory. As a result, a user following the documented workflow can create an untracked secret file inside the repository without any repository-level safeguard preventing it from being staged and committed. Storing a secret in `.env` is a common development pattern, but it must be paired with explicit ignore rules, placeholder-only templates, and warnings against committing credentials. Without those controls, the setup process creates a foreseeable credential-disclosure risk. ### Attack Path 1. A user follows the setup documentation and creates `.env` in the project directory. 2. The user places a live `BUFFER_API_KEY` in that file. 3. Because no `.gitignore` rule protects `.env`, the file is visible to normal source-control staging operations. 4. The user runs a broad command such as `git add .`, archives the entire project, or uploads the project directory. 5. The `.env` file is committed, shared, or published with the live credential. 6. Anyone with access to the re ...[truncated 721 chars]
Remediation
## Remediation Suggestions 1. Add a `.gitignore` file containing at least: ```gitignore .env .env.* !.env.example node_modules/ ``` 2. Add the referenced `.env.example` file with placeholders only: ```env BUFFER_API_KEY= BUFFER_API_URL=https://api.buffer.com/graphql ``` 3. Clearly warn users never to commit, publish, log, or paste live API keys into conversations. 4. Prefer environment injection through a trusted secret manager in production and automated environments. 5. Add automated secret scanning or a pre-commit check to detect committed Buffer credentials. 6. If a key has already entered source-control history, revoke and rotate it immediately; deleting only the current file is insufficient. 7. Ensure release packaging excludes `.env` and other local credential files.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (56)

Known Vulnerable Dependency: vitest==1.6.1 — 1 advisory(ies): CVE-2026-47429 (When Vitest UI server is listening, arbitrary file can be read and executed)

Critical
Category
Supply Chain
Confidence
90% confidence
Finding
vitest 1.6.1 is flagged for arbitrary file read and execution when the Vitest UI server is running. Although this is a dev dependency, the advisory describes a severe capability if the UI is exposed, so the vulnerability is real but context-limited to testing/development workflows rather than normal skill execution.

Known Vulnerable Dependency: vitest==1.6.1 — 1 advisory(ies): CVE-2026-47429 (When Vitest UI server is listening, arbitrary file can be read and executed)

Critical
Category
Supply Chain
Confidence
97% confidence
Finding
This project includes Vitest in a version family flagged as vulnerable to arbitrary file read and code execution when the Vitest UI server is listening. Even though Vitest is a devDependency, developer tools are often run locally or in shared CI environments, and exploitation could expose source code, secrets, or enable code execution in those contexts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
cd skills/buffer
npm install
cp .env.example .env
# Add your BUFFER_API_KEY to .env
```
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Ae1

High
Category
analysis-evasion
Content
node ./buffer.js profiles
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node ./buffer.js profiles
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node ./buffer.js profiles
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node ./buffer.js profiles
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node ./buffer.js profiles
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
export function validateApiKey(apiKey) {
  if (!apiKey || !apiKey.trim()) {
    throw new Error(
      `Missing Buffer API key. Add BUFFER_API_KEY to your .env file.\nGet one at: ${BUFFER_API_KEY_URL}`
    );
  }
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
export function validateApiKey(apiKey) {
  if (!apiKey || !apiKey.trim()) {
    throw new Error(
      `Missing Buffer API key. Add BUFFER_API_KEY to your .env file.\nGet one at: ${BUFFER_API_KEY_URL}`
    );
  }
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
export function validateApiKey(apiKey) {
  if (!apiKey || !apiKey.trim()) {
    throw new Error(
      `Missing Buffer API key. Add BUFFER_API_KEY to your .env file.\nGet one at: ${BUFFER_API_KEY_URL}`
    );
  }
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
96% confidence
Finding
The lockfile pins axios 1.13.6, and the reported advisories include SSRF/proxy-bypass and prototype-pollution-related request handling issues. Because this skill is a CLI-style package that directly depends on axios, any code paths making outbound HTTP requests could inherit those flaws, making this a real supply-chain risk rather than a purely theoretical issue.

Known Vulnerable Dependency: brace-expansion==1.1.12 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
86% confidence
Finding
brace-expansion 1.1.12 is flagged for multiple denial-of-service conditions involving pathological expansion patterns. In this file it appears as a transitive dev dependency, so the main risk is build/test-time process hangs or memory exhaustion if attacker-controlled glob/brace patterns are processed.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
90% confidence
Finding
form-data 4.0.5 is flagged for CRLF injection in multipart field names/filenames, which can let attacker-controlled input corrupt HTTP multipart requests or smuggle unintended headers/content boundaries. Since axios pulls this package in, code that builds multipart requests from untrusted input could be affected.

Known Vulnerable Dependency: nanoid==3.3.11 — 3 advisory(ies): CVE-2026-67214 (nanoid: non-secure generators can loop indefinitely with negative size); CVE-2026-67213 (nanoid: custom generators can loop indefinitely when size is zero); CVE-2026-73086 (nanoid: Integer Overflow or Wraparound)

High
Category
Supply Chain
Confidence
80% confidence
Finding
nanoid 3.3.11 is reported to have several edge-case denial-of-service or overflow issues. Here it is a transitive dev dependency through tooling, so the practical impact is lower and likely limited to development/build contexts unless untrusted input reaches affected generator APIs.

Known Vulnerable Dependency: postcss==8.5.8 — 4 advisory(ies): CVE-2026-45623 (PostCSS: Arbitrary file read and information disclosure via attacker-controlled ); CVE-2026-69153 (PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappi); CVE-2026-41305 (PostCSS has XSS via Unescaped </style> in its CSS Stringify Output) +1 more

High
Category
Supply Chain
Confidence
84% confidence
Finding
postcss 8.5.8 is flagged for issues including arbitrary file read and XSS-related behavior in tooling contexts. In this lockfile it is a dev dependency via Vite, so the risk is mainly present during builds or developer tooling execution, but it is still a legitimate vulnerability in the software supply chain.

Known Vulnerable Dependency: vite==5.4.21 — 3 advisory(ies): CVE-2026-39365 (Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling); CVE-2026-53571 (vite: `server.fs.deny` bypass on Windows alternate paths); CVE-2026-53632 (launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows)

High
Category
Supply Chain
Confidence
90% confidence
Finding
vite 5.4.21 is reported vulnerable to path traversal and filesystem restriction bypasses, but it is present only as a dev dependency in this project. That makes the issue real yet mainly relevant when running local dev servers or build tooling, not as part of the published runtime skill behavior.

Credential Access

High
Category
Privilege Escalation
Content
Reason: API authentication failed (401 Unauthorized)

Fix:
1. Check your API key in .env
2. Generate a new key at: https://publish.buffer.com/settings/api
3. Make sure the key starts with "Bearer "
Confidence
91% confidence
Finding
The skill explicitly instructs users to check and use an API key stored in `.env`, which involves handling sensitive credentials for a third-party account capable of posting to social profiles. In an agent context, credential access is high risk because weak guidance can lead to secret exposure in terminal output, debugging traces, generated files, or repository commits, enabling account misuse.

Self-Modification

High
Category
Rogue Agent
Content
### Phase 7: Documentation (Tasks 49-56)

49. [x] Write SKILL.md with quick start
50. [x] Add command reference to SKILL.md
51. [x] Add examples to SKILL.md
52. [x] Add troubleshooting section
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README encourages immediate posting, queueing, and scheduling to live social accounts without clearly warning that the skill can perform real external actions on the user's behalf. In an agent-skill context, this increases the risk of unintended publication, reputational harm, or accidental automation because users may treat examples as low-risk when they actually trigger live account activity.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README notes use of a Buffer API key and direct communication with Buffer's GraphQL API, but it does not warn that post content, profile identifiers, and account actions are transmitted to a third-party external service. This omission can lead users to unknowingly send sensitive or unpublished content through the integration, creating privacy, confidentiality, and account-governance risks.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill supports broad publishing via `--all` and comma-separated `--profiles` but does not prominently warn that a single command can post across every connected social account. In an agent-driven context, ambiguous user prompts or operator mistakes could cause unintended mass publication, creating reputational and operational harm even without malicious code.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This code accesses a sensitive credential via process.env.BUFFER_API_KEY and immediately uses it to configure an API client. There is no confirmation prompt, logging, or inline documentation warning that the skill uses environment-based credentials.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The createPost call sends content and profile identifiers to an external Buffer API and requests queueing of the post, which can affect external accounts. The file does not include any confirmation, visible disclosure, or explanatory comment describing this network action.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The file reads BUFFER_API_KEY and BUFFER_API_URL from environment variables to perform an external API operation, but it provides no confirmation prompt, user-facing log, or explanatory comment disclosing that credentials and network access are involved. The existing code comments only mention API documentation limits, not the sensitive credential usage or outbound request behavior.

Static analysis

No suspicious patterns detected.