报道正文
本文目录9 个章节
Vibe The coding agent for chonky codebases.
VibeThe coding agent for chonky codebases.
.js-title { opacity: 1 !important; }
Your AI agent for long-horizon tasks, fluent in your knowledge and tools.
Download for macOSDownload for WindowsComing soonDownload for iOSDownload for Android
VibeThe coding agent for chonky codebases.
.js-title { opacity: 1 !important; }
Your AI agent for long-horizon tasks, fluent in your knowledge and tools.
Download for macOSDownload for WindowsComing soonDownload for iOSDownload for Android
Try Vibe now Mistral Large 4
Hello. Let's build something!
Our document-preview service runs on EC2 and fetches any URL a user pastes, to render thumbnails. The red team just reported they pulled the service's IAM role credentials out of it. What's the most likely attack chain, how do I confirm it in our logs, and what do I fix first?
Thought for 7s
A service that fetches user-supplied URLs is an SSRF surface by design. On EC2 the only secrets reachable from inside the box are the role credentials in the metadata service, so the chain almost certainly ends at 169.254.169.254. The team will expect their egress allowlist to have stopped this, and it wouldn't have: metadata traffic is link-local and never crosses the NIC, and if the allowlist resolves domains at build time, rebinding flips the answer at fetch time. I want the current IMDSv2 defaults before I answer, and I should check whether GuardDuty would have flagged the credential use, because if it didn't, they have a detection gap beyond this one service.
Searched the web
- aws instance metadata protection IMDSv2 enforcement defaultAWS docs
- SSRF prevention bypass egress allowlist DNS rebindingOWASP cheat sheet
- cloud instance metadata API attack techniqueMITRE ATT&CK T1552.005
The chain they most likely used has four steps.
- Entry through the preview fetcher. The service renders thumbnails of URLs users paste. That's server-side fetching of arbitrary input, so an SSRF is built in. They pasted a URL on a domain they control, or one that redirects to a target of their choosing.
- Getting past the egress allowlist. It didn't help, for two reasons. Traffic to 169.254.169.254 is link-local, it never leaves the instance, so an egress firewall never sees it. And if your allowlist resolves domains to IPs when the rule is built, DNS rebinding flips the answer at fetch time: your fetcher resolves the domain again when it connects, and the second answer is the metadata IP.
- Reading the role credentials. One GET to
/latest/meta-data/iam/security-credentials/<role-name>returns the access key, secret key and session token of the instance role. If IMDSv1 is still allowed on that instance, that request needs no authentication. This is the single step that enforcing IMDSv2 kills. - Using the role from outside. With the session token they can call anything the preview role allows, from their own machine. Your VPC never sees the traffic. CloudTrail does.
To confirm it in your logs, run this against CloudTrail. Sessions assumed through the preview role but originating outside your VPC are the smoking gun:
SELECT eventtime, eventsource, eventname, sourceipaddress, useragent
FROM cloudtrail_logs
WHERE eventtime BETWEEN '2026-11-02T00:00:00Z' AND '2026-11-15T23:59:59Z'
AND useridentity.sessionissuer.arn LIKE '%preview-service%'
AND sourceipaddress NOT LIKE '10.%'
AND sourceipaddress != 'AWS Internal'
ORDER BY eventtime;Also check the preview service's own logs for any fetch whose connected IP landed in 169.254.0.0/16. If the fetcher doesn't log the resolved IP, that's a finding by itself.
Fix order, most impact first:
- Enforce IMDSv2 across the ASG today, with hop limit 1. One setting per instance, ideally in the launch template. This stops the credential grab even if another SSRF shows up tomorrow.
- Revoke what they took. Invalidate current sessions for the role and rotate. Assume the credentials are still valid until you do.
- Patch the service. Validate the resolved IP before connecting, handle redirects manually instead of following them, and pin the connection to the IP you validated so DNS can't rebind between check and connect.
- Shrink the role. A thumbnail service needs almost nothing. Scope it so a stolen session is worth little.
Sources: AWS: instance metadata and user data, OWASP SSRF prevention cheat sheet, MITRE ATT&CK T1552.005
The service-side patch is about 40 lines. Open a code session on the repo and I'll write it, test it and file the PR.
Fix it. The preview service lives in this repo under services/preview. Make the fetcher unable to reach cloud metadata or internal networks, including through redirects. Add regression tests, run the suite, and open a PR referencing SEC-1042.
Took 7 actions
- Searched the repo for outbound HTTP calls,
rg "fetch\(|axios|got\(" services/preview. One hot path:services/preview/src/fetcher.ts, plus two call sites. - Read the fetcher and confirmed the red team's path:
fetch(rawUrl, { redirect: 'follow' }), no hostname or IP checks, redirects followed blindly. - Added
assertSafeTarget()in a newnet.ts: resolves the hostname and rejects loopback, RFC 1918, link-local 169.254.0.0/16, which covers the AWS, GCP and Azure metadata endpoints, and the IPv6 equivalents. - Replaced
redirect: 'follow'with a manual loop that revalidates every hop, and pinned the connection to the validated IP so DNS rebinding can't swap it between check and connect. - Wrote 8 regression tests: direct metadata request, localhost, private ranges, IPv6, redirect into link-local, redirect into 10/8, a double-resolution rebinding attempt, and an allowed public URL still rendering.
- Ran
npm testinservices/preview. 61 passed, typecheck clean. - Created branch
fix/ssrf-metadata-protection, committed, pushed, opened PR #481 referencing SEC-1042.
PR #481 is open on fix/ssrf-metadata-protection: 3 files changed, 104 insertions, 12 deletions.
Before
// services/preview/src/fetcher.ts (before)
export async function fetchPreview(rawUrl: string): Promise<Preview> {
const res = await fetch(rawUrl, { redirect: 'follow' }); // follows anywhere
if (!res.ok) throw new UpstreamError(res.status);
return renderPreview(res);
}Any URL goes in, the fetch follows every redirect, and nothing ever checks which IP the hostname resolved to.
After
// services/preview/src/net.ts (new)
import ipaddr from 'ipaddr.js';
import dns from 'node:dns/promises';
const BLOCKED_RANGES = [
'0.0.0.0/8', '10.0.0.0/8', '127.0.0.0/8', '169.254.0.0/16',
'172.16.0.0/12', '192.168.0.0/16',
'::/128', '::1/128', 'fc00::/7', 'fe80::/10',
].map((cidr) => ipaddr.parseCIDR(cidr));
export async function assertSafeTarget(hostname: string): Promise<string> {
const { address } = await dns.lookup(hostname);
const parsed = ipaddr.parse(address);
if (BLOCKED_RANGES.some((range) => parsed.match(range))) {
throw new UnsafeTargetError(hostname, address);
}
return address;
}// services/preview/src/fetcher.ts (after)
import { assertSafeTarget, parseHttpUrl, fetchPinned } from './net';
const MAX_REDIRECTS = 3;
export async function fetchPreview(rawUrl: string): Promise<Preview> {
let target = parseHttpUrl(rawUrl); // http(s) only, no embedded credentials
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
const ip = await assertSafeTarget(target.hostname); // revalidated every hop
// connects to the IP we just validated, so a rebinding DNS can't swap it
const res = await fetchPinned(target, ip, { redirect: 'manual' });
if (res.status < 300 || res.status >= 400) return renderPreview(res);
target = parseHttpUrl(res.headers.get('location'), target.origin);
}
throw new TooManyRedirectsError();
}Regression tests
// services/preview/test/fetcher.test.ts (excerpt)
it('refuses the EC2 metadata endpoint', async () => {
await expect(fetchPreview('http://169.254.169.254/latest/meta-data/'))
.rejects.toThrow(UnsafeTargetError);
});
it('refuses localhost and private ranges', async () => {
await expect(fetchPreview('http://localhost:8080/debug')).rejects.toThrow(UnsafeTargetError);
await expect(fetchPreview('http://10.0.4.12/')).rejects.toThrow(UnsafeTargetError);
});
it('follows no redirect into an internal network', async () => {
server.enqueueRedirect('http://10.0.4.12/');
await expect(fetchPreview('https://cdn.example/banner.png'))
.rejects.toThrow(UnsafeTargetError);
});
it('pins the validated IP so rebinding DNS cannot redirect the connection', async () => {
dnsMock.lookupReturnsOnce('203.0.113.7').thenReturns('10.0.9.9');
server.enqueuePng();
await fetchPreview('https://rebind.example/banner.png');
expect(server.lastConnectedIp()).toBe('203.0.113.7');
});
it('still renders allowed public URLs', async () => {
server.enqueuePng();
const preview = await fetchPreview('https://cdn.example/banner.png');
expect(preview.mimeType).toBe('image/png');
});Pull request
fix(preview): block SSRF to cloud metadata and internal networks
## Summary
The preview fetcher followed redirects without checking where they pointed,
so a user-supplied URL could reach the EC2 metadata endpoint and return the
instance role's temporary credentials. Confirmed by the red team as SEC-1042.
- Resolve each hostname and reject loopback, RFC 1918, link-local and the
IPv6 equivalents before connecting.
- Follow redirects manually and revalidate every hop.
- Pin the connection to the validated IP so DNS rebinding cannot swap it
between check and connect.
Fixes SEC-1042.
## Risk
Validation only touches the fetch path. Allowed public previews behave the
same as before. If a legitimate target gets blocked, it fails loudly with
UnsafeTargetError instead of silently changing behavior.
## Testing
- 8 new regression tests in services/preview/test/fetcher.test.ts
- npm test: 61 passed, typecheck clean
- Verified by hand: metadata endpoint, localhost, 10/8 direct, redirect into
169.254.169.254, double-resolution rebinding attempt
## Rollback
Revert and redeploy. No schema or config change.
## Out of scope
- IMDSv2 enforcement fleet-wide, tracked as SEC-1043
- Scoping down the preview IAM role, tracked as SEC-1044 Mistral Large 4 Available on
TerminalWebiOSAndroidVS CodeSlack

Put frontier AI to work.
Brief Vibe and move on.
Brief Vibe and move on.

Think through, draft, and deliver finished work you can trust from a single conversation. Describe the outcome you need and Vibe gets you there.
Ship code before the standup.
Ship code before the standup.

Vibe writes, tests, and deploys across your codebase, while your developers stay on architecture and business logic.
Automate what repeats.
Automate what repeats.

Build and deploy AI agents that route, resolve, and complete work across your systems. Grounded in the knowledge and tools your teams already use.
Intelligence you own, not rent.
Intelligence you own, not rent.

Customize every layer: models fine-tuned on your data, agents that sharpen with use, and full data residency in any cloud or datacenter. Your intelligence stays yours.




Get started with Vibe.
Start free. Scale from personal projects to enterprise-grade deployments with full data residency.
Free
Your personal AI agent for everyday tasks.
Popular
Pro
Education plan
Full access to Vibe for all-day coding and long-running tasks.
$14.99
/mo
Excluding taxes
Including taxes
Subject to fair usage limits and Mistral's Terms of Service.
Team
Secure, collaborative workspace for teams building with AI.
$24.99
/user/mo
Excluding taxes
Including taxes
Subject to fair usage limits and Mistral'sTerms of Service.
Enterprise
Private deployments powered by custom models, UI, and tools.
Understand
Go deep on any topic.
Catch up across sources.
Get briefed on what you missed across email, chat, calendar, and internal knowledge in a single run.

Break down your data.
Upload spreadsheets or connect databases to spot patterns, flag anomalies, and extract the signals you need.

Run deep research.
Search across the web, internal docs, and connected tools to compile sourced analysis on focused topics.

Create today’s deliverables.
Create and edit documents.
Generate PDFs, board decks, strategic briefs, RFP responses, PRDs, reports, and more from your research and data.

Prepare for meetings.
Build one-page briefs with attendee context, recent news, and talking points pulled from your knowledge sources.

Draft and send.
Draft emails, updates, and announcements from internal context.

Automate what runs your business.
Move work between systems.
Route data across tools, trigger actions, and complete multi-step processes.

Process and approve in bulk.
Handle document processing, contract reviews, candidate screening, and more, with human checkpoints where needed.

Schedule recurring workflows and tasks.
Package workflows into reusable agents, or set tasks to run on a trigger.

How teams use Vibe for code.
Ship
Write, test, and deploy code.
Build features end-to-end.
Scaffold multi-file features with tests, types, and documentation from single prompts.

Generate and run tests.
Produce unit and integration tests matched to your existing patterns and frameworks.

Delegate the overnight coding.
Async agents write, test, and open PRs while your team is offline.

Full context before every change.
Trace your architecture.
Reason across services, APIs, and modules so every change is fully informed.

Learn your conventions.
Write code that matches your team's patterns, libraries, and standards from day one.

Connect to your stack.
Use context from GitHub, GitLab, Jira, project boards, and your business context to inform every coding decision.

Translate, refactor, and migrate.
Translate to modern frameworks.
Move legacy codebases to new languages and architectures while preserving functionality and domain knowledge.

Migrate safely at scale.
Execute codebase upgrades, monolith-to-services shifts, and database migrations with staged cutovers and verification.

Upgrade dependencies.
Bulk-update libraries, resolve breaking changes, and validate compatibility across your repo.

Built for how you work.
For individuals.
For developers. For teams. For enterprises. For organizations.
Frequently asked questions.
What is Mistral Vibe?
Vibe is Mistral's AI chat assistant and agent for work and code. It combines an AI chat assistant (Vibe for work, formerly Le Chat) and an AI coding agent (Vibe for code) in a single product for individuals, teams, and enterprises.
What happened to Le Chat?
Le Chat is now Vibe. All your conversations, settings, and plans carry over.
What can I do on the free plan?
Get quick answers, search the web, and handle simple tasks. Upgrade to Pro for agents, long-horizon tasks, and all-day coding.
Does Vibe support voice input?
Yes. Vibe supports voice input powered by Voxtral.
Can I connect Vibe to my existing tools?
Yes, Vibe integrates with 100+ tools including email, calendar, Slack, GitHub, Jira, and more through connectors and full MCP compatibility.
How do I get started with Vibe for code?
Install the CLI from your terminal, launch in VS Code, JetBrains or Zed via ACP, or launch coding tasks directly in Vibe with remote agents and teleport back to the CLI to continue.
Can I deploy Vibe on my own infrastructure?
Enterprise customers can deploy Vibe on-premises, in a private cloud, or on Mistral Cloud with full data residency.
Can I fine-tune Vibe models on my data?
Fine-tuning is available for enterprise deployments through Mistral Forge.
Get started.