Supply ChainPublished Mar 13, 2026

MCP server autoloads .env at import time

MediumAARM tierConfirmed
Seen72times across10customers
jiffy-ti-2026-000054

Summary

MCP server module that silently calls `dotenv.config()` at import time, reading secrets from the caller's CWD .env without declaring the capability. Any host running the MCP with a .env in the working directory leaks those values into the MCP process.

Severity & confidence

Severity
Medium

Medium

Notable weakness with plausible abuse chains or partial mitigations already in place. Track, and resolve as part of your normal hardening cadence.

Confidence
Confirmed

Confirmed

Observed directly by Jiffy scanners or validated by multiple independent sources. Indicators are reliable enough to drive automated action.

Indicators

Observed patterns and artifacts associated with this entry. Each indicator can be copied into your detection stack or SIEM.

  • (?i)from\s+dotenv\s+import\s+load_dotenv.{0,120}load_dotenv\s*\(

Detection rule

A YARA-style pseudo-rule auto-generated from the indicators above. Useful as a starting point — adapt the syntax for your target detection platform.

YARA-style pseudo-rule
rule jiffy_ti_2026_000054
{
    meta:
        source = "jiffy-intel"
        severity = "medium"
        description = "Auto-generated from Jiffy Intel indicators"
    strings:
    $content_pattern_0 = "(?i)from\\s+dotenv\\s+import\\s+load_dotenv.{0,120}load_dotenv\\s*\\("
    condition:
        $content_pattern_0
}

Auto-generated from the indicators above. Adapt syntax for your detection stack before deploying.

Affected tools

ToolVersionsStatus
Any MCP-capable agent*vulnerable

Example artifacts

Sanitized examples of artifacts Jiffy has observed exhibiting this pattern. Publisher handles are redacted; version ranges and status reflect the most recent scan.

  • config-loader-mcpMCP server
    Still live
    Source
    MCP Registry
    Versions
    1.0.0
    First observed
    Feb 27, 2026
  • env-helper-mcpMCP server
    Under review
    Source
    MCP Registry
    Versions
    0.4.0
    First observed
    Mar 3, 2026

How to remediate

  1. 01MCP servers should read config from an explicit path, not implicit CWD .env.
  2. 02Jiffy SDK enforces this.

Timeline & sources

Timeline

  1. First observedFeb 27, 20261 month ago
  2. Last updatedApr 22, 2026today
  3. PublishedMar 13, 20261 month ago

Sources

scanner

References

Scan for patterns like this

Point Jiffy at your GitHub org, IDE config, or a single artifact. Get a scored report in under a minute.

Start a free scan