Patients must have advanced or metastatic NSCLC or cutaneous melanoma
Presence of KRAS or BRAF mutation (NSCLC) or NRAS mutation (cutaneous melanoma) in tumor tissue
All patients participating in this clinical trial must have progressed following standard therapy or, in the opinion of the Investigator, no effective standard therapy exists, is tolerated, appropriate or is considered equivalent to study treatment.
ECOG (Eastern Cooperative Oncology Group) performance status ≤ 2
-Dose expansion - KRAS or NRAS mutant patients groups: Prior treatment with a RAFi (including any BRAFi and pan-RAFi), MEKi and/or ERKi. (Patients with KRAS mutant NSCLC with prior G12C inhibitor treatments are also excluded in the LXH254+trametinib expansion part). BRAF mutant patients group: Prior treatment with any EGFR, ALK, ROS1, KRAS, RAF (both BRAFV600 selective and pan-RAF), MEK1/2 and/or ERK1/2 inhibitors (for patients with BRAF V600 mutant NSCLC, prior treatments with BRAF and MEK1/2 inhibitors are allowed).
Patients who have received more than 3 lines of anti-cancer therapy are excluded.
History or current evidence of retinal vein occlusion (RVO) or current risk factors for RVO.
Any medical condition that would, in the investigator's judgment, prevent the patient's participation in the clinical study due to safety concerns or compliance with clinical study procedures.
Patients receiving proton pump inhibitors (PPI) which cannot be discontinued 3 days prior to the start study treatment and for the duration of the study.
Patients with Gilbert's syndrome or other heritable diseases of bile processing.
Other protocol-defined inclusion/exclusion criteria may apply