Pembrolizumab in Treating Participants With Metastatic, Recurrent or Locally Advanced Cancer and Genomic Instability

This phase II trial studies how well pembrolizumab works in treating participants with cancer that has spread to other places in the body, has come back or has spread to nearby tissues or lymph nodes. Monoclonal antibodies such as, pembrolizumab, may interfere with the ability of tumor cells to grow and spread.

PRIMARY OBJECTIVES:

I. To evaluate the response rate of pembrolizumab in participants with evidence of genomic instability who have solid tumors with POLE and POLD1 mutations.

II. To evaluate the response rate of pembrolizumab in participants with evidence of genomic instability who have solid tumors with BRCA1/2 mutations.

SECONDARY OBJECTIVES:

I. To compare the complete and partial response rate, and response durability (immune related progression free survival), to historical cohort information of unselected patients treated with pembrolizumab.

TERTIARY OBJECTIVES:

I. To evaluate the CD4+ and CD8+ T cell response in the tumor microenvironment and peripheral blood of patients treated on this study as well as the frequencies, activation/differentiation, functionality, and co-inhibitory molecule expression of immune cell populations in peripheral blood and tumor, before and after treatment with systemic pembrolizumab.

II. To measure PD-L1 expression in pretreatment tumor biopsies and in post treatment tumor tissue, as well as on biopsies taken at progression, to capture data on the relationship between PD-L1 expression and patient outcome.

III. To perform deep sequencing for detection of PD-1 and PD-L1 polymorphisms that may correlate with clinical outcomes as well as identification of mutations in immunoregulatory genes that are potential predictors of response to these therapies.

IV. To perform exome sequencing of pre-treatment tumor specimens to determine if the presence of immunogenic neoantigens is associated with response.

V. To perform ribonucleic acid (RNA) sequencing to determine if expression of checkpoint genes, immune-regulatory modules, or non-coding RNAs including repetitive RNAs and retroelements are associated with response.

OUTLINE:

Participants receive pembrolizumab intravenously (IV) over 30 minutes on day 1. Courses repeat every 21 days in the absence of disease progression or unacceptable toxicity. Participants with disease progression may continue pembrolizumab for up to 1 year.

After completion of study treatment, participants are followed up at 30 days then every 12 weeks.

Eligibility Criteria:
Inclusion Criteria:

* Be willing and able to provide written informed consent/assent for the trial
* Have a diagnosis of a tumor with evidence of genomic instability on Clinical Laboratory Improvement Amendments (CLIA) certified genomic testing, inclusive of mutations in POLE, POLD1 for arm 1 and in BRCA1 and BRCA2 for arm 2; in arm 2, enrollment of breast and ovarian histologies will be limited to a total of 10 patients
* Have advanced cancer (metastatic, recurrent or locally advanced) and measurable disease based on Response Evaluation Criteria in Solid Tumors (RECIST) 1.1
* Be willing to provide archived tumor tissue; tissue from the most obtained core or excisional biopsy of a tumor lesion is preferred; 20 unstained slides are preferred but a minimum of 15 slides will be acceptable; if adequate tissue is not present the patient may consent to a newly obtained biopsy
* Have a performance status of 0 or 1 on the Eastern Cooperative Oncology Group (ECOG) performance scale
* Absolute neutrophil count (ANC) \>= 1,500 /mcL, performed within 10 days of treatment
* Platelets \>= 100,000 / mcL, performed within 10 days of treatment
* Hemoglobin \>= 9 g/dL or \>= 5.6 mmol/L without transfusion or erythropoietin (EPO) dependency (within 7 days of assessment), performed within 10 days of treatment
* Serum creatinine =\< 1.5 X upper limit of normal (ULN) OR Measured or calculated creatinine clearance \>= 60 mL/min for subject with creatinine levels \> 1.5 X institutional ULN (glomerular filtration rate \[GFR\] can also be used in place of creatinine or creatinine clearance \[CrCl\]), performed within 10 days of treatment
* Serum total bilirubin =\< 1.5 X ULN OR direct bilirubin =\< ULN for subjects with total bilirubin levels \> 1.5 ULN, performed within 10 days of treatment
* Aspartate aminotransferase (AST) (serum glutamic oxaloacetic transaminase \[SGOT\]) and alanine aminotransferase (ALT) (serum glutamic pyruvic transaminase \[SGPT\]) =\< 2.5 X ULN OR =\< 5 X ULN for subjects with liver metastases, performed within 10 days of treatment
* Albumin \>= 2.5 mg/dL, performed within 10 days of treatment
* International normalized ratio (INR) or prothrombin time (PT) =\< 1.5 X ULN unless subject is receiving anticoagulant therapy as long as PT or partial thromboplastin time (PTT) is within therapeutic range of intended use of anticoagulants, performed within 10 days of treatment
* Activated partial thromboplastin time (aPTT) =\< 1.5 X ULN unless subject is receiving anticoagulant therapy as long as PT or PTT is within therapeutic range of intended use of anticoagulants, performed within 10 days of treatment
* Female subject of childbearing potential should have a negative urine or serum pregnancy within 72 hours prior to receiving the first dose of study medication; if the urine test is positive or cannot be confirmed as negative, a serum pregnancy test will be required
* Female subjects of childbearing potential should be willing to use 2 methods of birth control or be surgically sterile, or abstain from heterosexual activity for the course of the study through 120 days after the last dose of study medication; subjects of childbearing potential are those who have not been surgically sterilized or have not been free from menses for \> 1 year
* Male subjects should agree to abstinence or use of an adequate method of contraception starting with the first dose of study therapy through 120 days after the last dose of study therapy

Exclusion Criteria:

* Is currently participating and receiving study therapy or has participated in a study of an investigational agent and received study therapy or used an investigational device within 4 weeks of the first dose of treatment
* Has a diagnosis of immunodeficiency that requires receiving systemic steroid therapy or any other form of immunosuppressive therapy within 7 days prior to the first dose of trial treatment or has resulted in life threatening episodes previously regardless of current treatment
* Has a known history of active TB (Bacillus tuberculosis)
* Hypersensitivity to pembrolizumab or any of its excipients
* Has had a prior anti-cancer monoclonal antibody (mAb) within 4 weeks prior to study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to agents administered more than 4 weeks earlier
* Has had prior chemotherapy, targeted small molecule therapy, or radiation therapy within 2 weeks prior to study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to a previously administered agent

  * Note: Subjects with =\< grade 2 neuropathy are an exception to this criterion and may qualify for the study
  * Note: If subject received major surgery, they must have recovered adequately from the toxicity and/or complications from the intervention prior to starting therapy
* Has a known additional malignancy that is progressing or requires active treatment; exceptions include basal cell carcinoma of the skin or squamous cell carcinoma of the skin that has undergone potentially curative therapy or in situ cervical cancer, or malignancies that have been inactive for three years or exceptionally indolent; any current diagnosis of second malignancy requires approval from principal investigator and sponsor
* Has known active central nervous system (CNS) metastases and/or carcinomatous meningitis; subjects with previously treated brain metastases may participate provided they are stable (without evidence of progression by imaging for at least four weeks prior to the first dose of trial treatment and any neurologic symptoms have returned to baseline), have no evidence of new or enlarging brain metastases, and are not using steroids for at least 30 days prior to trial treatment; patients who had oligometastatic disease treated with stereotactic radiation or gamma knife therapy may receive treatment 14 days after therapy as long as they are not requiring steroids; this exception does not include carcinomatous meningitis which is excluded regardless of clinical stability
* Has active autoimmune disease that has required systemic treatment in the past 2 years (i.e. with use of disease modifying agents, corticosteroids or immunosuppressive drugs); replacement therapy (e.g., thyroxine, insulin, or physiologic corticosteroid replacement therapy for adrenal or pituitary insufficiency, etc.) is not considered a form of systemic treatment
* Has known history of, or any evidence of active, non-infectious pneumonitis
* Has an active infection requiring systemic therapy
* Has a history or current evidence of any condition, therapy, or laboratory abnormality that might confound the results of the trial, interfere with the subject?s participation for the full duration of the trial, or is not in the best interest of the subject to participate, in the opinion of the treating investigator
* Has known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial
* Is pregnant or breastfeeding, or expecting to conceive or father children within the projected duration of the trial, starting with the pre-screening or screening visit through 120 days after the last dose of trial treatment
* Has received prior therapy with an anti-PD-1, anti-PD-L1, or anti-PD-L2 agent
* Has a known history of human immunodeficiency virus (HIV) (HIV 1/2 antibodies)
* Has received a live vaccine within 30 days of planned start of study therapy

  * Note: Seasonal influenza vaccines for injection are generally inactivated flu vaccines and are allowed; however intranasal influenza vaccines (e.g., Flu-Mist) are live attenuated vaccines, and are not allowed
* Tumors harboring non-hotspot POLE or POLD1 mutations that show clear evidence of microsatellite instability (MSI) will be excluded
* Has known active hepatitis B (e.g., hepatitis B surface antigen \[HBsAg\] reactive) or hepatitis C (e.g., hepatitis C virus \[HCV\] ribonucleic acid \[RNA\] \[qualitative\] is detected)