{
  "id": "CARPO-2026-004",
  "slug": "joomla-jctables-sqli-virtual-patching-auto-update",
  "title_en": "Joomla JCTables SQLi Virtual Patching & Component Auto-Update",
  "title_fr": "Correctif Virtuel & Mise à Jour Automatisée du Composant Joomla JCTables",
  "summary_en": "Instant virtual patching at WAF layer (ModSecurity / Cloudflare) to drop unauthenticated CRUD queries without tokens, followed by automated component upgrade to 1.21.1 and database table integrity verification.",
  "summary_fr": "Application immédiate d'un correctif virtuel WAF pour rejeter les requêtes CRUD sans jeton, suivie de la mise à niveau automatique du composant en 1.21.1 et vérification de la base.",
  "target_cves": [
    "CVE-2026-76570"
  ],
  "target_product": "joomla:jctables",
  "remediation_type": "VIRTUAL_PATCH_WAF",
  "automation_framework": "bash_cli",
  "zero_downtime": true,
  "estimated_duration_minutes": 10,
  "rollback_supported": true,
  "pre_flight_checks": [
    {
      "name": "Verify Joomla Database Integrity",
      "command": "php /var/www/html/cli/joomla.php database:check",
      "expected_outcome": "Database table schema reported as valid and consistent."
    }
  ],
  "orchestration_steps": [
    {
      "step_number": 1,
      "phase": "WAF_VIRTUAL_PATCH",
      "action_en": "Deploy ModSecurity rule blocking com_jctables task=api calls lacking valid authentication cookies.",
      "action_fr": "Déployer la règle ModSecurity bloquant les requêtes com_jctables task=api sans session.",
      "code_snippet": "SecRule REQUEST_URI \"@contains option=com_jctables\" \\\n    \"id:202676570,phase:2,deny,status:403,log,chain,msg:'Hermes CARPO: Block CVE-2026-76570 SQLi'\" \\\n    SecRule ARGS:task \"@rx ^api\\.\" \\\n    \"chain\" \\\n    SecRule &REQUEST_COOKIES:/joomla_/ \"@eq 0\"",
      "automation_task": "ansible.builtin.blockinfile: path: /etc/nginx/modsec/corerules.conf"
    },
    {
      "step_number": 2,
      "phase": "COMPONENT_UPDATE",
      "action_en": "Upgrade JCTables extension to 1.21.1 via Joomla CLI runner.",
      "action_fr": "Mettre à jour l'extension JCTables vers la version 1.21.1 via le runner CLI Joomla.",
      "code_snippet": "php /var/www/html/cli/joomla.php extension:install --url=https://repo.joomcode.com/pkg_jctables_1.21.1.zip",
      "automation_task": "command: php cli/joomla.php extension:install --url=https://repo.joomcode.com/pkg_jctables_1.21.1.zip"
    }
  ],
  "post_flight_validation": [
    {
      "test_probe": "Attempt unauthenticated SQL query against com_jctables front-end controller",
      "validation_criteria": "Response must return 403 Forbidden (WAF) or 400 Invalid Token (v1.21.1)",
      "success_condition": "Zero database leakage or SQL execution"
    }
  ],
  "rollback_procedure": {
    "trigger_conditions": "Legitimate admin users unable to view database views or HTTP 500 error triggered.",
    "automated_rollback_code": "php /var/www/html/cli/joomla.php extension:uninstall com_jctables",
    "manual_fallback_instructions": "Restore backup of #__extensions and #__jctables tables from /backups/db-pre-carpo.sql."
  },
  "audit_compliance": {
    "cisa_bod_alignment": "VulnCheck Zero-Day Emergency Patch Standard",
    "nist_sp_800_40_revision": "NIST SP 800-40 Rev 2 Section 3.2",
    "change_ticket_template": "CHG-2026-JCT-7657"
  },
  "methodology_version": "CARPO-1.0"
}