Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. praisonai
  4. ›
  5. GHSA-4qq2-2j2x-x62c

GHSA-4qq2-2j2x-x62c: npm PraisonAI MCPSecurity Basic/OAuth authentication policies accept invalid credentials without validation

June 18, 2026

The published npm package praisonai exports an MCPSecurity helper described in source as:

MCP Security - Authentication, authorization, and rate limiting
Provides security policies for MCP servers.

Its AuthMethod type advertises five authentication methods:

export type AuthMethod = 'none' | 'api-key' | 'bearer' | 'basic' | 'oauth';

The authentication-policy evaluator, however, only validates credentials for api-key and bearer:

if (policy.auth.method === 'api-key' || policy.auth.method === 'bearer') {
const valid = policy.auth.validate
? await policy.auth.validate(token)
: this.validateApiKey(token);

if (!valid) {
return { allowed: false, reason: 'Invalid credentials' };
}
}

return { allowed: true, context: { authenticated: true } };

For basic and oauth, any non-empty Authorization header skips the supplied validate callback and returns allowed. A local PoV configures auth.validate to always return false; invalid api-key and bearer credentials are rejected, while invalid basic and oauth credentials are accepted without calling the validator.

This is a protection-mechanism failure in the exported npm MCP security helper. It is distinct from the separate issue that the npm MCPServer HTTP transport does not enforce authentication by default.

References

  • github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4qq2-2j2x-x62c
  • github.com/advisories/GHSA-4qq2-2j2x-x62c

Code Behaviors & Features

Detect and mitigate GHSA-4qq2-2j2x-x62c with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.5.1 before 1.7.2

Fixed versions

  • 1.7.2

Solution

Upgrade to version 1.7.2 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-287: Improper Authentication
  • CWE-288: Authentication Bypass Using an Alternate Path or Channel
  • CWE-863: Incorrect Authorization

Source file

npm/praisonai/GHSA-4qq2-2j2x-x62c.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:22:49 +0000.