CIMAvax Vaccine, Nivolumab, and Pembrolizumab in Treating Patients With Advanced Non-small Cell Lung Cancer or Squamous Head and Neck Cancer

This phase I/II trial studies the best dose and side effects of recombinant human EGF-rP64K/montanide ISA 51 vaccine (CIMAvax) and nivolumab and to see how well they work in treating patients with non-small cell lung cancer or squamous head and neck cancer that has spread to other places in the body. Vaccine therapy, such as CIMAvax vaccine may help slow down and stop tumor growth. Immunotherapy with monoclonal antibodies, such as nivolumab and pembrolizumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. Giving CIMAvax vaccine together with nivolumab or pembrolizumab may work better in treating patients with non-small cell lung cancer or squamous head and neck cancer.

PRIMARY OBJECTIVES:

* I. To identify the maximum dose of CIMAvax in combination with nivolumab based on dose limiting toxicities (DLTs) as assessed by Common Terminology Criteria for Adverse Events version 4.03 (CTCAE version \[v\] 4.03). (Phase I)
* II. To evaluate the 12-month overall survival of CIMAvax combined with nivolumab in patients with advanced non-small cell lung cancer (NSCLC). (Phase II-Study A)
* III. To evaluate the 6-month progression free survival (PFS) of CIMAvax combined with nivolumab in patients with advanced recurrent squamous cell carcinoma of the head and neck. (Phase II-Study B)
* IV. To evaluate the objective response rate of pembrolizumab in combination with CIMAvax as first-line therapy in patients with advanced NSCLC (PD-L1 expression \>= 50%). (Phase II-Study C)
* V. To evaluate the 12-month PFS of pembrolizumab in combination with CIMAvax as maintenance therapy in patients with advanced squamous NSCLC (PD-L1 expression \< 50%) (Phase II-Study D)
* VI. To evaluate the 12-month PFS of pembrolizumab in combination with CIMAvax as maintenance therapy in patients with advanced NON-squamous NSCLC without EGFR/ALK/ROS-1/KRAS mutations (PD-L1 expression \< 50%) (Phase II- Study E)

SECONDARY OBJECTIVES

* I. To assess the toxicity of CIMAvax combined with nivolumab using the Cancer Therapy Evaluation Program (CTEP) National Cancer Institute (NCI) Common Terminology Criteria for Adverse Events (CTCAE version 4.03). (Phase I)
* II. Determine the preliminary efficacy of the combination of anti-PD1 therapy with CIMAvax. (Phase I) III. To evaluate progression free survival (PFS) for the combination of CIMAvax and nivolumab in patients with advanced NSCLC. (Phase II-Study A) IV. To evaluate the 12-month overall survival of patients with advanced recurrent squamous cell carcinoma of the head and neck who received nivolumab in combination with CIMAvax. (Phase II-Study B)
* V. To evaluate the PFS and 12-month overall survival of CIMAvax in combination with pembrolizumab as first-line therapy in patients with advanced NSCLC (PD-L1 expression \>= 50%). (Phase II-Study C)
* VI. To evaluate the PFS and overall survival of CIMAvax in combination with pembrolizumab as maintenance therapy in patients with advanced squamous NSCLC (PD-L1 expression \< 50%). (Phase iI- Study D)
* VII. To evaluate the PFS and overall survival of CIMAvax in combination with pembrolizumab as maintenance treatment in non-squamous NSCLC patients without EGFR/ALK/ROS-1/KRAS mutations after induction chemoimmunotherapy (PD-L1 expression \< 50%).(Phase II - Study E)
* VIII. To assess the toxicity of CIMAvax combined with nivlumab or pembrolizumab suing the CTEP NCI Common Terminology Criteria for Adverse Events (CTCAE version 4.03). (Phase II)

TERTIARY OBJECTIVES:

I. To conduct correlative studies comparing blood EGF levels, platelet levels, markers of immune response and functionality of antibody response. (Phase I) II. To examine the association of EGFR (total and activated), PD-1 and PD-L1 expression and mutations in tumor tissue with biomarkers of genetic and immune response. (Phase I and II) III. Comparison of response assessment criteria for a prospective analysis (immune-related \[ir\] Response Evaluation Criteria in Solid Tumors \[RECIST\] response assessment versus \[vs.\] immune-related Response Criteria \[irRC\] vs. RECIST 1.1). (Phase I and II) IV. To characterize the blood EGF levels and other blood-based biomarkers of patients censored from the trial because of low titer response. (Phase II)

OUTLINE: This is a phase I dose escalation study of CIMAvax followed by a phase II study.

LOADING PHASE I: Patients receive CIMAvax intramuscularly (IM) and nivolumab intravenously (IV) over 60 minutes on day 1. Treatment repeats every 2 weeks for up to 4 doses in the absence of disease progression or unacceptable toxicity. Within 4 weeks after the 4th dose, patients receive CIMAvax IM at the same time as the next nivolumab dose.

MAINTENANCE PHASE I: Patients who do not experience a DLT receive CIMAvax every 4 weeks and nivolumab every 2 weeks.

PHASE II STUDY A and B: Patients receive CIMAvax IM and nivolumab IV over 60 minutes. Treatment with CIMAvax repeats every 2 weeks for 4 doses during the loading phase and every 4 weeks during the maintenance phase in the absence of disease progression or unacceptable toxicity. Courses for nivolumab repeat every 2 weeks in the absence of disease progression or unacceptable toxicity. Patients in Study A with antibody titer \>= 1:4000 at the end of the loading phase may receive CIMAvax IM every 8 or 12 weeks during the maintenance phase.

PHASE II STUDY C: Patients with PD-L1expression \>= 50% receive CIMAvax IM and pembrolizumab IV over 30 minutes. Treatment with CIMAvax repeats every 2 weeks for 4 doses during the loading phase and every 4 weeks during the maintenance phase in the absence of disease progression or unacceptable toxicity. Courses for pembrolizumab repeat every 2 weeks for 2 years in the absence of disease progression or unacceptable toxicity.

PHASE II STUDY D: Patients with PD-L1 expression \< 50% after 4 cycles of induction chemotherapy with pembrolizumab, receive CIMAvax IM and pembrolizumab IV over 30 minutes. Treatment repeats every 4 weeks for 2 years in the absence of disease progression or unacceptable toxicity

After completion of study treatment, patients are followed up every 30 days for 120 days.

Eligibility Criteria:
Inclusion Criteria:

* Have an Eastern Cooperative Oncology Group (ECOG) performance status of =\< 2 at the time of study treatment initiation
* Have pathologically confirmed diagnosis of NSCLC (Phase I, Phase II Studies A, C and D, E and Expansion Cohort) or squamous cell head and neck cancer (Phase II Study B)
* Must be eligible for treatment with nivolumab as standard of care (for nivolumab treatment groups only)
* Phase II Study A and Expansion Cohort AE: Patients with advanced (metastatic) NSCLC, whose disease progressed during or after platinum based therapy
* Phase II Study B: Patients with advanced recurrent head and neck squamous cell carcinoma
* Phase II Study C: Patients with unresectable NSCLC with PD-L1 expression \>= 50% for first line therapy in advanced stage. In the rare event that there is a discrepancy in the results of PD-L1 testing (i.e. 2 or more specimens were tested, etc.), eligibility status will be per the discretion of the principal investigator (PI) after review of other available biomarker testing
* Phase II Study D: Patients with advanced squamous NSCLC with PD-L1 expression \<50% with PR/CR or stable disease by RECIST after at least 4 cycles of induction chemoimmunotherapy with platinum-based combination with pembrolizumab, prior to initiation of maintenance pembrolizumab
* Phase II Study E: Patients with advanced NON-Squamous NSCLC (without EGFR/ALK/ROS-1/KRAS mutations) with PD-L1 expression \<50% with PR/CR or stable disease by RECIST after at least 4 cycles of induction chemoimmunotherapy with platinum-based combination with pembrolizumab, prior to initiation of maintenance pembrolizumab
* NSCLC patients in study A and expansion cohort AE with EGFR or ALK genomic tumor aberrations (determined through either tissue- or liquid biopsy-based platform) should have disease progression on Food and Drug administration (FDA)-approved therapy for these aberrations prior to receiving nivolumabanti-PD1 therapy; patients with smoking history being considered for Study C may enroll and be treated pending results of molecular testing
* Have at least 6 month life expectancy
* Absolute neutrophil count (ANC) \>= 1.5 x 10\^9/L
* Platelets \>= 100 x 10\^9/L
* Hemoglobin \>= 9 g/dL
* Serum /plasma creatinine =\< 1.5 x institution upper limit of normal (ULN) or estimated glomerular filtration rate (GFR) (measured or calculated with Cockcroft and Gault formula) \> 45 ml/min
* Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) =\< 3 x ULN (ALT and AST =\< 5 x ULN is acceptable if liver metastases are present)
* Total serum bilirubin =\< 1.5 x ULN; for patients with well documented Gilbert's syndrome, total bilirubin =\< 3 x ULN with direct bilirubin within normal range
* Troponin-I =\< ULN and B-type natriuretic peptide (BNP) \< 200 pg/ml
* Left ventricular ejection fraction (LVEF) \>= lower limit of normal (LLN) (institutional limit)
* Patients enrolled onto Phase I dose escalation or Expansion Cohort (AE) must have presence of evaluable disease; patients enrolled onto Phase II studies A, B or C must have measurable disease as defined in RECIST 1.1. Patients enrolled onto Phase II D or E must have measurable disease as defined in RECIST 1.1 prior to induction chemmoimmunotherapy.
* Participants of child-bearing potential must agree to use adequate contraceptive methods (e.g., hormonal or barrier method of birth control; abstinence) prior to study entry; should a woman become pregnant or suspect she is pregnant while she or her partner is participating in this study, she should inform her treating physician immediately
* Participant or legal representative must understand the investigational nature of this study and sign an Independent Ethics Committee/Institutional Review Board approved written informed consent form prior to receiving any study related procedure
* Phase II studies: Participant agrees to provide tumor biopsy tissue before treatment, blood samples at the start of treatment and at multiple times during the study and, a tumor biopsy at the end of the trial or after disease progression; archival formalin-fixed paraffin-embedded (FFPE) tissue is permitted for Expansion Cohort AE and Cohort D or E (i.e.; fresh biopsy is NOT mandatory). Archival FFPE tissue is also permitted for Study C patients provided that tissue is adequate and no systemic anti-cancer therapy had been administered between the time specimen was obtained and start of protocol therapy

Exclusion Criteria:

* Receipt of anticancer chemotherapy within 4 weeks before the first administration of study drug
* Previous anti-PD1 or PD-L1 immunotherapy is not allowed;(exceptions: cohort D, E and expansion cohort). Treatment with other investigational agents within 6 half-lives of first administration of study drug is not allowed
* Prior radiotherapy or gamma knife within 2 weeks of study treatment for non-brain metastasis; subjects must have recovered from all radiation related toxicities
* Active/untreated brain metastasis; whole brain radiation or gamma knife radiosurgery performed less than 4 weeks prior to first administration of study drug; previously treated brain metastasis allowed as long as not requiring steroids and stable on imaging at least 4 weeks after completing radiation therapy
* Leptomeningeal involvement regardless of treatment status
* Tumor with mutation that is known to be sensitive to FDA approved targeted therapy but has not yet received such targeted therapy
* Have an active autoimmune disease that required systemic treatment in the past 2 years (i.e., with use of disease-modifying antirheumatic agents or immunosuppressive drugs) Note: Replacement therapy (e.g. thyroxine, insulin as replacement therapy for thyroid, diabetes) is permitted.systemic use of immunosuppressant drugs such as steroids (except as hormone replacement therapy or short-course supportive medication such as chemotherapy or drug allergy, etc.), azathioprine, tacrolimus, cyclosporine, etc. within 4 weeks before recruitment
* Currently receiving or has received systemic corticosteroids within 4 weeks prior to starting study drug for management of brain metastases, or who have not fully recovered from side effects of such treatment; steroids for endocrine replacement or receipt of short-course of steroids during the preceding 4 week period as supportive medication such as for drug allergy, anti-emetic, etc. is allowed
* Had major surgery within 14 days prior to starting study drug or has not recovered from major side effects (tumor biopsy is not considered major surgery) resulting from a prior surgery
* Has known immunosuppressive disease (e.g. human immunodeficiency virus \[HIV\], acquired immune deficiency syndrome \[AIDS\] or other immune depressing disease); testing is not mandatory
* Active, clinically serious infections or other serious uncontrolled medical conditions
* Patient has known hypersensitivity to the components of the study drugs or any analogs
* History or current evidence of any condition, therapy, or laboratory abnormality that might confound the results of the study, interfere with the patient?s participation for the full duration of the study, or is not in the best interest of the patient to participate, in the opinion of the treating investigator, including, but not limited to:

  * Myocardial infarction or arterial thromboembolic events within 6 months prior to baseline or severe or unstable angina, New York Heart Association (NYHA) class III or IV disease
  * History of documented congestive heart failure (New York Heart Association functional classification III or IV) within 6 months prior to baseline
  * Uncontrolled hypertension (systolic blood pressure \[SBP\] \> 160/diastolic blood pressure \[DBP\] \> 100 despite medical intervention)
  * History of myocarditis of any etiology
  * History of ventricular arrhythmias
* Phase II only: Patients diagnosed with an invasive cancer within 2 years prior to starting protocol therapy with the following exceptions: non-melanoma skin cancers, in-situ cancers, and prostate cancer gleason =\< to 6 (under surveillance or treated), early stage node-negative estrogen receptor (ER)+/progesterone receptor (PR)+ breast cancer with Oncotype Dx score \< 25 not taking adjuvant hormonal therapy
* Pregnant or nursing female participants
* Any condition which in the investigator?s opinion deems the participant an unsuitable candidate to receive study drug
* Unwilling or unable to follow protocol requirements