☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 4.3 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N 🐛 CWE-284
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-7476

CVE-2024-7476 Supply Chain Attack in Lunary-ai
📅 PUBLISHED: 2025-03-20 10:09 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.23%
👁️
0.23% probability
5.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 4.3
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: L Integrity Low
A: N Availability None
4.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-7476 is a broken access control vulnerability in lunary-ai/lunary versions 1.2.7 through 1.4.2. An authenticated attacker can exploit this flaw to modify any user's templates by sending a crafted HTTP POST request to the /v1/templates/{id}/versions endpoint. The vulnerability arises from insufficient authorization checks, allowing a low-privileged user to tamper with templates belonging to other users. The issue is resolved in version 1.4.3.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the lunary-ai/lunary Python package. Users should verify their installed version and update to the patched release. No known malicious packages or typosquatting have been reported in relation to this CVE.

CVSS Breakdown & Threat Level

  • CVSS Score: 4.3 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: None
  • Integrity Impact: Low
  • Availability Impact: None

The threat level is medium due to the requirement for authentication and the limited impact on integrity. However, the ability to modify any user's templates could lead to data corruption or injection of malicious content.

Deep Dive & Mechanics

The vulnerability exists in the template version management endpoint. The application fails to verify that the authenticated user has ownership or appropriate permissions over the template being modified. By sending a POST request to /v1/templates/{id}/versions with a valid template ID, an attacker can create new versions of templates they do not own.

The core issue is a missing or insufficient authorization check in the backend logic. The endpoint likely retrieves the template by ID but does not compare the template's owner with the authenticated user's identity before allowing modifications.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

@app.route('/v1/templates/<template_id>/versions', methods=['POST'])
@login_required
def create_template_version(template_id):
    template = Template.query.get(template_id)
    if not template:
        return jsonify({'error': 'Template not found'}), 404
    # Missing ownership check
    new_version = TemplateVersion(template_id=template.id, data=request.json)
    db.session.add(new_version)
    db.session.commit()
    return jsonify({'version_id': new_version.id}), 201

Patched Code (Conceptual):

@app.route('/v1/templates/<template_id>/versions', methods=['POST'])
@login_required
def create_template_version(template_id):
    template = Template.query.get(template_id)
    if not template:
        return jsonify({'error': 'Template not found'}), 404
    # Added ownership check
    if template.owner_id != current_user.id:
        return jsonify({'error': 'Forbidden'}), 403
    new_version = TemplateVersion(template_id=template.id, data=request.json)
    db.session.add(new_version)
    db.session.commit()
    return jsonify({'version_id': new_version.id}), 201

Exploitation & Lab Setup

Red Team

  1. Prerequisites: Valid authentication credentials for a lunary instance.
  2. Identify Target: Obtain a template ID belonging to another user (e.g., via enumeration or observation).
  3. Craft Request:
    curl -X POST https://target.com/v1/templates/{victim_template_id}/versions \
      -H "Authorization: Bearer <your_token>" \
      -H "Content-Type: application/json" \
      -d '{"content": "malicious template data"}'
    
  4. Verify: Check that the new version appears under the victim's template.

Blue Team

  1. Monitor Logs: Look for POST requests to /v1/templates/*/versions from users who do not own the referenced template.
  2. Audit Permissions: Review access control lists and ensure template ownership is enforced.
  3. Honeypot: Deploy a fake template with a known ID and monitor for unauthorized version creation attempts.

Indicators of Compromise (IOCs)

  • Network: HTTP POST requests to /v1/templates/{id}/versions where {id} is not owned by the requester.
  • Logs: Server logs showing 403 Forbidden after patching, or successful creation of template versions by unexpected users.
  • File System: Unexpected template version entries in the database for templates not owned by the creating user.

Detection Engineering

YARA Rule

rule CVE_2024_7476_lunary_broken_access {
    meta:
        description = "Detects exploitation attempts for CVE-2024-7476"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-7476"
    strings:
        $endpoint = "/v1/templates/"
        $versions = "/versions"
        $method = "POST"
    condition:
        $endpoint and $versions and $method
}

Sigma Rule

title: CVE-2024-7476 - Broken Access Control in lunary-ai/lunary
id: 8a3f7c2e-5d1b-4a9e-8c6f-2b3d1e4f5a6c
status: experimental
description: Detects unauthorized POST requests to template version endpoints
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem|startswith: '/v1/templates/'
        cs-uri-stem|endswith: '/versions'
    condition: selection
falsepositives:
    - Legitimate template version creation by template owners
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-7476 - Broken Access Control in lunary-ai/lunary"; flow:to_server; http.method; content:"POST"; http.uri; content:"/v1/templates/"; distance:0; content:"/versions"; distance:0; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Upgrade to lunary version 1.4.3 or later.
  2. Workaround: If immediate upgrade is not possible, implement a reverse proxy rule to restrict access to the /v1/templates/*/versions endpoint based on user roles.
  3. Long-term: Conduct a thorough access control audit across all API endpoints. Implement ownership checks using middleware or decorators.
  4. Monitoring: Enable detailed logging for all template modification requests and alert on anomalies.

Report generated by Valters IT DevSecOps & CTI Division

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

lunary-ai
lunary

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-7476/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.