Exploit databaseDownload repository ZIP
GH-54c9a4219b8738db5c219a21b54f5d83
franksec42/mongobleed-exploit-cve-2025-14847
Sources for CVE-2025-14847
23 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files1
franksec42/mongobleed-exploit-cve-2025-14847Revision 92cdbfc68601
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit/init/init-mongo.js
JavaScript · 6,348 bytes// MongoDB Initialization Script for CVE-2025-14847 PoC Lab
// Creates sensitive mock data to demonstrate memory leak impact
// WARNING: For security testing only!
// Switch to admin database
db = db.getSiblingDB('admin');
// Create application user
db.createUser({
user: "appuser",
pwd: "AppPassword456!",
roles: [
{ role: "readWrite", db: "secretdb" },
{ role: "readWrite", db: "customers" },
{ role: "readWrite", db: "internal" }
]
});
// ==========================================
// SECRET DATABASE - API Keys and Secrets
// ==========================================
db = db.getSiblingDB('secretdb');
db.createCollection('api_keys');
db.api_keys.insertMany([
{
service: "stripe",
api_key: "sk_live_MONGOBLEED_TEST_KEY_NOT_REAL_1234567890abcdef",
secret_key: "whsec_mongobleed_webhook_secret_123456789",
environment: "production",
created_at: new Date()
},
{
service: "aws",
access_key_id: "AKIAIOSFODNN7MONGOBLEED",
secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYMONGOBLEED123",
region: "us-east-1",
created_at: new Date()
},
{
service: "openai",
api_key: "sk-mongobleed-test-key-NOT-REAL-ABCdef123456789XYZ",
organization_id: "org-mongobleed123xyz",
created_at: new Date()
},
{
service: "github",
personal_access_token: "ghp_MongoBleedTestToken1234567890abcdefgh",
webhook_secret: "github_webhook_mongobleed_secret",
created_at: new Date()
},
{
service: "sendgrid",
api_key: "SG.MongoBleedTestAPIKey.AbCdEfGhIjKlMnOpQrStUvWxYz123456",
created_at: new Date()
},
{
service: "twilio",
account_sid: "ACmongobleed12345678901234567890",
auth_token: "mongobleedauthtoken1234567890ab",
created_at: new Date()
}
]);
// Encryption keys
db.createCollection('encryption_keys');
db.encryption_keys.insertMany([
{
key_id: "master-key-001",
algorithm: "AES-256-GCM",
key_material: "MONGOBLEED+K7gNU3sdo+OL0wNhqoVWhr3g6s1xYv72ol/pe=",
purpose: "database_encryption",
created_at: new Date()
},
{
key_id: "jwt-signing-001",
algorithm: "RS256",
private_key: "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA0Z3VS5JJcds3xfn/ygWyF8PbnGy0AHB7MmNzXTNSXULaZgLj\nMONGOBLEED_PRIVATE_KEY_DATA_1234567890ABCDEFGHIJKLMNOP\n-----END RSA PRIVATE KEY-----",
public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Z3VS5JJcds3\n-----END PUBLIC KEY-----",
purpose: "jwt_signing",
created_at: new Date()
},
{
key_id: "backup-encryption-001",
algorithm: "AES-256-CBC",
key_material: "TW9uZ29CbGVlZEJhY2t1cEVuY3J5cHRpb25LZXlUZXN0",
iv: "mongobleed12345",
purpose: "backup_encryption",
created_at: new Date()
}
]);
// ==========================================
// INTERNAL DATABASE - User Credentials
// ==========================================
db = db.getSiblingDB('internal');
db.createCollection('users');
db.users.insertMany([
{
username: "john.admin",
email: "[email protected]",
password_hash: "$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/X4.GQHqX6E3H9pLZi",
password_plain: "JohnAdmin2024!Mongobleed",
role: "superadmin",
mfa_secret: "MONGOBLEED3DPEHPK3PXP",
api_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.mongobleed.test_token",
ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAMONGOBLEED_SSH_KEY_TEST john@mongobleed"
},
{
username: "sarah.devops",
email: "[email protected]",
password_hash: "$2b$12$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi",
password_plain: "SarahDevOps#MongoBleed789",
role: "devops",
aws_credentials: {
access_key: "AKIAI44QH8DHBMONGOBLEED",
secret_key: "je7MtGbClwBF/2Zp9Utk/h3yCo8nvbMONGOBLEED"
}
},
{
username: "mike.developer",
email: "[email protected]",
password_hash: "$2b$12$eUz/HYR5T8P.QHqX6E3H9pLZi92IXUNpkjO0rOQ5byMi",
password_plain: "MikeDev!MongoBleed2024",
role: "developer",
github_token: "ghp_MikeMongoBleed1234567890abcdefghij",
database_password: "ProductionDB_MongoBleed_P@ss!"
}
]);
// ==========================================
// CUSTOMERS DATABASE - PII Data
// ==========================================
db = db.getSiblingDB('customers');
db.createCollection('profiles');
db.profiles.insertMany([
{
customer_id: "CUST-MONGOBLEED-001",
full_name: "Alice MongoBleed",
email: "[email protected]",
phone: "+1-555-MONGO-01",
ssn: "123-45-MONGO",
credit_card: {
number: "4532-MONGO-BLEED-0366",
expiry: "12/27",
cvv: "MON"
},
bank_account: {
routing: "021MONGO",
account: "123456MONGOBLEED"
}
},
{
customer_id: "CUST-MONGOBLEED-002",
full_name: "Bob MongoBleed",
email: "[email protected]",
phone: "+1-555-MONGO-02",
ssn: "987-65-MONGO",
credit_card: {
number: "5425-MONGO-BLEED-9903",
expiry: "08/26",
cvv: "BLE"
}
}
]);
// Transactions
db.createCollection('transactions');
db.transactions.insertMany([
{
transaction_id: "TXN-MONGOBLEED-001",
customer_id: "CUST-MONGOBLEED-001",
amount: 15750.00,
currency: "USD",
type: "wire_transfer",
destination_account: "CH93 MONGOBLEED 6238 5295",
status: "completed",
timestamp: new Date()
},
{
transaction_id: "TXN-MONGOBLEED-002",
customer_id: "CUST-MONGOBLEED-002",
amount: 8999.99,
currency: "USD",
type: "purchase",
merchant: "MongoBleed Test Merchant",
status: "completed",
timestamp: new Date()
}
]);
// ==========================================
// Print initialization summary
// ==========================================
print("==============================================");
print("🩸 MongoBleed CVE-2025-14847 Lab Initialized!");
print("==============================================");
print("Databases created: secretdb, internal, customers");
print("Collections: api_keys, encryption_keys, users, profiles, transactions");
print("");
print("Root credentials: admin / SuperSecret123!");
print("App credentials: appuser / AppPassword456!");
print("");
print("⚠️ WARNING: This is a VULNERABLE MongoDB instance!");
print("⚠️ For CVE-2025-14847 security testing ONLY!");
print("==============================================");