Yes, they can induce an acute attack.
Drugs metabolised by cytochrome P450 (CYP) such as analgesics may induce acute attacks in patients with hepatic porphyrias. In recent years, preclinical and clinical studies have suggested that cannabinoid pharmaceutical preparations may be potentially useful in the treatment of pain .
There is even a clinical case about acute intermittent porphyria in a marijuana user:
Mr. G is a 55 year old Caucasian male with a past medical history significant for acute intermittent porphyria (AIP), chronic back pain, renal insufficiency, hypertension, and nicotine dependence. The patient has presented to the hospital with multiple AIP exacerbations since diagnosed eleven year prior to the current case. [...] Urine drug screen was positive for cannabinoids, which he admitted to frequent marijuana use .
But an experimental study on mice failed to prove that:
Our findings indicate that CP-55,940 (a cannabinoid CB1 receptor agonist) and its metabolites do not behave as porphyrinogenic drugs and may potentially be safe for treating pain in patients with acute porphyrias .
- Fontanellas A, Manzanares J, García-Bravo M, Buzaleh AM, Méndez M, Oliva JM, Batlle A, Palomo T, Enríquez de Salamanca R. Effects of repeated administration with CP-55,940, a cannabinoid CB1 receptor agonist on the metabolism of the hepatic heme. Int. J. Biochem. Cell Biol. 2005 Aug;37(8):1620-5. doi: 10.1016/j.biocel.2005.02.010. PubMed PMID: 15896668.
- Ware SK. Acute Intermittent Porphyria With Psychiatric Manifestations: A Case Report. Ment Health Clin. 2013;3(5):100. Available at: http://cpnp.org/resource/mhc/2013/11/acute-intermittent-porphyria-psychiatric-manifestations-case-report. Accessed July 27, 2014.