{
  "id": "CARPO-2026-001",
  "slug": "fortinet-fortimail-preauth-file-write-remediation",
  "title_en": "Fortinet FortiMail Pre-Auth Path Traversal Remediation & IBE Neutralization",
  "title_fr": "Remédiation de la Traversée de Répertoires Pré-Auth sur Fortinet FortiMail & Neutralisation IBE",
  "summary_en": "Automated two-phase remediation plan addressing CVE-2026-104286: immediate zero-downtime CLI disablement of Identity-Based Encryption (IBE) followed by an orchestrated firmware upgrade to 8.0.2 / 7.6.7 with automated cryptographic mail queue integrity checks.",
  "summary_fr": "Plan de remédiation automatisé en deux phases pour la CVE-2026-104286 : désactivation CLI sans coupure de l'Identity-Based Encryption (IBE) suivie d'une mise à niveau de firmware orchestrée vers 8.0.2 / 7.6.7 avec contrôles d'intégrité de la file de messagerie.",
  "target_cves": [
    "CVE-2026-104286"
  ],
  "target_product": "fortinet:fortimail",
  "remediation_type": "FIRMWARE_UPGRADE",
  "automation_framework": "ansible",
  "zero_downtime": true,
  "estimated_duration_minutes": 25,
  "rollback_supported": true,
  "pre_flight_checks": [
    {
      "name": "HA Cluster Synchronisation Audit",
      "command": "get system status | grep 'HA mode'",
      "expected_outcome": "Cluster status must be Synchronized or standalone active."
    },
    {
      "name": "Configuration Backup & Cryptographic Checksum",
      "command": "execute backup full-config sftp /backups/fortimail-pre-carpo.cfg",
      "expected_outcome": "Backup file stored successfully with exit code 0."
    },
    {
      "name": "Inspect Active File Descriptors in Web Daemon",
      "command": "fnsysctl lsof -i :443",
      "expected_outcome": "No anomalous active shells spawned under web server process."
    }
  ],
  "orchestration_steps": [
    {
      "step_number": 1,
      "phase": "EMERGENCY_MITIGATION",
      "action_en": "Disable Identity-Based Encryption (IBE) globally to sever the vulnerable URI parameter pipeline.",
      "action_fr": "Désactiver l'Identity-Based Encryption (IBE) globalement pour couper la chaîne vulnérable.",
      "code_snippet": "config system global\n    set ibe disable\nend",
      "automation_task": "fortios_config: commands: ['config system global', 'set ibe disable', 'end']"
    },
    {
      "step_number": 2,
      "phase": "HA_FAILOVER_ORCHESTRATION",
      "action_en": "Gracefully transfer active SMTP ingress sessions to secondary HA node.",
      "action_fr": "Transférer en douceur les sessions SMTP actives vers le nœud HA secondaire.",
      "code_snippet": "diagnose system ha failover start",
      "automation_task": "ansible.builtin.command: fortimail-cli diagnose system ha failover start"
    },
    {
      "step_number": 3,
      "phase": "FIRMWARE_UPGRADE_INSTALLATION",
      "action_en": "Stage and apply target firmware patch (FortiMail 8.0.2 or 7.6.7) with cryptographic hash validation.",
      "action_fr": "Déployer et installer le correctif de firmware (FortiMail 8.0.2 ou 7.6.7) avec validation SHA-256.",
      "code_snippet": "execute restore image tftp FML-802-build0231.out 10.10.0.50",
      "automation_task": "fortinet.fortimail.fortimail_firmware: version: '8.0.2' checksum: 'sha256:8f2a...'"
    },
    {
      "step_number": 4,
      "phase": "CLEANUP_AND_RESYNCHRONIZE",
      "action_en": "Re-enable IBE if required after verified build upgrade and resynchronize HA cluster nodes.",
      "action_fr": "Réactiver l'IBE après confirmation du build corrigé et resynchroniser les nœuds HA.",
      "code_snippet": "execute ha synchronize config",
      "automation_task": "ansible.builtin.command: fortimail-cli execute ha synchronize config"
    }
  ],
  "post_flight_validation": [
    {
      "test_probe": "Synthetic NULL-byte path traversal test against /ibe/ endpoint",
      "validation_criteria": "HTTP response code must be 400 Bad Request or 404 Not Found without file creation",
      "success_condition": "Status 400 with strict URI path rejection"
    },
    {
      "test_probe": "SMTP TLS Delivery & SPF/DKIM verification check",
      "validation_criteria": "Synthetic test email delivered through appliance with 100% policy pass",
      "success_condition": "SMTP 250 OK Queue ID generated"
    }
  ],
  "rollback_procedure": {
    "trigger_conditions": "Secondary HA node fails health check, or post-patch mail throughput drops by > 15% for 3 minutes.",
    "automated_rollback_code": "execute restore image tftp FML-801-previous.out 10.10.0.50\nexecute restore config tftp fortimail-pre-carpo.cfg 10.10.0.50",
    "manual_fallback_instructions": "Console access via serial DB-9: reboot appliance into dual-partition backup firmware bank B."
  },
  "audit_compliance": {
    "cisa_bod_alignment": "BOD 26-04 compliant (executed within 72h window)",
    "nist_sp_800_40_revision": "Section 3.2.1 Patch Implementation & Section 4.1 Verification",
    "change_ticket_template": "CHG-2026-FML-0104"
  },
  "methodology_version": "CARPO-1.0"
}