{
  "id": "CARPO-2026-002",
  "slug": "citrix-netscaler-pitboss-hardening-rolling-upgrade",
  "title_en": "Citrix NetScaler ADC/Gateway Pitboss Poisoning Hardening & Rolling Upgrade",
  "title_fr": "Durcissement Anti-Empoisonnement Pitboss & Mise à Niveau Roulante Citrix NetScaler",
  "summary_en": "Zero-downtime rolling cluster orchestration neutralizing CVE-2026-88771 and CVE-2026-88772: sanitizes pitboss monitoring pipes, sandboxes Perl alerting scripts, and applies fixed build across NetScaler HA pairs.",
  "summary_fr": "Orchestration roulante de cluster sans coupure neutralisant CVE-2026-88771 et CVE-2026-88772 : assainissement des tubes pitboss, confinement du script Perl d'alerte et déploiement du firmware sur la paire HA.",
  "target_cves": [
    "CVE-2026-88771",
    "CVE-2026-88772"
  ],
  "target_product": "citrix:netscaler_adc",
  "remediation_type": "SERVICE_CONFIG_HARDENING",
  "automation_framework": "ansible",
  "zero_downtime": true,
  "estimated_duration_minutes": 20,
  "rollback_supported": true,
  "pre_flight_checks": [
    {
      "name": "Audit Secondary Node Replication Status",
      "command": "show ha node",
      "expected_outcome": "Master State: Primary, Partner State: Secondary, Sync: SUCCESS."
    },
    {
      "name": "Inspect /var/vpn/themes/ for rogue files",
      "command": "ls -la /var/vpn/themes/",
      "expected_outcome": "Zero undocumented .php or .css files present."
    }
  ],
  "orchestration_steps": [
    {
      "step_number": 1,
      "phase": "SERVICE_SANDBOXING",
      "action_en": "Mount /var/netscaler/ and /tmp as noexec or restrict ns_monuploadd_err.pl execution wrapper.",
      "action_fr": "Restreindre le script ns_monuploadd_err.pl pour interdire l'interprétation de métacaractères shell.",
      "code_snippet": "chmod 700 /netscaler/ns_monuploadd_err.pl",
      "automation_task": "ansible.builtin.file: path: /netscaler/ns_monuploadd_err.pl mode: '0700'"
    },
    {
      "step_number": 2,
      "phase": "ROLLING_NODE_UPGRADE",
      "action_en": "Upgrade Secondary node first to fixed release 14.1-36.42 while Primary handles active traffic.",
      "action_fr": "Mettre à niveau le nœud secondaire vers la version 14.1-36.42 pendant que le primaire traite le trafic.",
      "code_snippet": "tar -zxvf build-14.1-36.42.tgz && ./installns -Y",
      "automation_task": "ansible.builtin.shell: cd /var/nsinstall && ./installns -Y"
    },
    {
      "step_number": 3,
      "phase": "HA_SWAP_AND_PRIMARY_UPGRADE",
      "action_en": "Force HA failover to the upgraded Secondary, verify stability, and upgrade remaining node.",
      "action_fr": "Forcer le basculement HA vers le secondaire mis à jour, valider la stabilité et mettre à jour le primaire.",
      "code_snippet": "force ha failover",
      "automation_task": "ansible.builtin.command: nscli force ha failover"
    }
  ],
  "post_flight_validation": [
    {
      "test_probe": "Check pitboss log ingestion with staged base64 headers",
      "validation_criteria": "Commands are parsed strictly as raw strings without shell expansion",
      "success_condition": "Log contains literal payload; no subprocess spawned"
    }
  ],
  "rollback_procedure": {
    "trigger_conditions": "Cluster sync fails or SSL handshake failure rate exceeds 0.05%.",
    "automated_rollback_code": "force ha failover\n./installns -Y -R /var/nsinstall/previous-build.tgz",
    "manual_fallback_instructions": "Reboot into legacy kernel kernel.old via boot menu."
  },
  "audit_compliance": {
    "cisa_bod_alignment": "BOD 26-04 NetScaler emergency patching SLA",
    "nist_sp_800_40_revision": "NIST SP 800-40 Rev 2 Section 4",
    "change_ticket_template": "CHG-2026-NS-0887"
  },
  "methodology_version": "CARPO-1.0"
}