therapy adapted for high risk and low risk hiv-associated anal cancer

Conditions: AIDS-Related Anal Carcinoma; Anal Margin Squamous Cell Carcinoma; Anal Non-Keratinizing Squamous Cell Carcinoma; Anal Squamous Cell Carcinoma; HIV Infection; Rectal Squamous Cell Carcinoma; Stage II Rectal Cancer AJCC v8; Stage IIB Anal Cancer AJCC v8; Stage III Anal Cancer AJCC v8; Stage III Rectal Cancer AJCC v8

Summary: this phase ii trial studies the side effects of chemotherapy and intensity modulated radiation therapy in treating patients with low-risk hiv-associated anal cancer, and nivolumab after standard of care chemotherapy and radiation therapy in treating patients with high-risk hiv-associated anal cancer. radiation therapy uses high energy x-rays to kill tumor cells and shrink tumors. chemotherapy drugs, such as mitomycin, fluorouracil, and capecitabine, work in different ways to stop the growth of tumor cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. giving chemotherapy with radiation therapy may kill more tumor cells. immunotherapy with monoclonal antibodies, such as nivolumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. giving nivolumab after standard of care chemotherapy and radiation therapy may help reduce the risk of the tumor coming back.

primary objectives: i. to determine the safety of reduced intensity chemo-radiation therapy (crt) in low-risk disease. ii. to determine the safety of nivolumab after standard crt in high-risk disease. secondary objectives: i. to estimate the efficacy (2-year disease-control rate \[dcr\]) of reduced intensity crt in low risk disease. ii. to estimate the efficacy (2-year disease-free survival \[dfs\] rate) of nivolumab after standard crt in high risk disease. iii. to evaluate the effect of low-dose crt on immune function (cd4+ cell count) and human immunodeficiency virus (hiv) viral load. iv. to evaluate the effect of nivolumab on immune function (cd4+ cell count) and hiv viral load. v. to assess combination antiretroviral therapy (cart) adherence before, during, and after treatment with crt and nivolumab to identify potential barriers to cart adherence when receiving concurrent oncological care. exploratory objectives: i. to determine the human papillomavirus (hpv) genotype in primary tumor and explore the relationship between specific hpv subtypes and clinical response to reduced intensity crt or nivolumab. ii. to explore the relationship between expression of pd-1 in immune cells and pd-l1 in immune cells or cancer epithelial cells in the primary diagnostic tumor and clinical response to nivolumab or reduced intensity crt. iii. to describe the effects of reduced intensity crt and nivolumab on viral hiv reservoirs. iv. to identify the presence of cell-free plasma hpv deoxyribonucleic acid (dna) before and after reduced intensity crt and nivolumab and explore the relationship with clinical response. v. to describe the effect of reduced intensity crt on quality of life (qol). outline: patients are assigned to 1 of 2 stratum. high-risk stratum: patients receive nivolumab intravenously (iv) over 30 minutes on day 1. treatment repeats every 4 weeks for up to 6 cycles in the absence of disease progression or unacceptable toxicity. patients also undergo echocardiography (echo) during screening as clinically indicated, sigmoidoscopy/colonoscopy, anoscopy/proctoscopy or digital rectal exam and computed tomography (ct) throughout the study as well as blood sample collection during screening and end of treatment (eot). low-risk stratum: patients receive mitomycin iv on day 1 and either fluorouracil iv on day 1 or capecitabine orally (po) twice daily (bid) on monday-friday until the completion of radiation therapy at the discretion of the treating physician. patients also undergo intensity modulated radiation therapy (imrt) once daily (qd) for 20-23 treatment sessions over 6 weeks. patients also undergo digital rectal exam, anoscopy/proctoscopy and ct throughout the study, receive fludeoxyglucose f-18 (fdg) iv and undergo positron emission tomography (pet)/ct, pet/magnetic resonance imaging (mri) and /or mri during screening and follow-up as well as blood sample collection during screening and eot. some patients undergo lymph node biopsy during screening at the discretion of the treating physician. after completion of study treatment, patients are followed up at 6 weeks, every 3 months for years 1-2, every 6 months for year 3, and then annually for years 4-5.

Eligibility criteria:
inclusion criteria: * high-risk stratum: participant is able to understand and willing to sign a written informed consent document * high-risk stratum: participant must have histologically proven stage (t3-t4n0m0 or t2-4n1m0) invasive squamous cell carcinoma (scc) of the anus or anorectum as documented before crt initiation, according to the american joint committee on cancer (ajcc) 8th edition. participants with squamous cell carcinoma of the anal margin are eligible if there is evidence of extension of the primary tumor into the anal canal. participants with tumors of non-keratinizing histology such as basaloid, transitional cell or cloacogenic histology are permitted * high-risk stratum: hiv-positive. documentation of hiv-1 infection by means of any one of the following: * documentation of hiv diagnosis in the medical record by a licensed health care provider. if the record contains information that the patient is taking food and drug administration (fda)-approved combination therapy for hiv infection, then this can be part of the record substantiating the hiv positive diagnosis * hiv-1 ribonucleic acid (rna) detection by a licensed hiv-1 rna assay demonstrating \> 1000 rna copies/ml * any licensed hiv screening antibody and/or hiv antibody/antigen combination assay confirmed by a second licensed hiv assay such as a hiv-1 western blot confirmation or hiv rapid multispot antibody differentiation assay. * note: the term "licensed" refers to a kit that has been certified or licensed by an oversight body within the participating country and validated internally (e.g., united states \[u.s.\] fda) * who (world health organization) and cdc (centers for disease control and prevention) guidelines mandate that confirmation of the initial test result must use a test that is different from the one used for the initial assessment. a reactive initial rapid test must be confirmed by either another type of rapid assay or an e/cia that is based on a different antigen preparation and/or different test principle (e.g., indirect versus competitive), or a western blot or a plasma hiv-1 rna viral load * high-risk stratum: age \>= 18 years * because no dosing or adverse event data are currently available on the use of nivolumab in participants \< 18 years of age, children are excluded from this study * high-risk stratum: eastern cooperative oncology group (ecog) performance status =\ = 50%) * high-risk stratum: life expectancy of greater than 6 months * high-risk stratum: hemoglobin \> 10 g/dl (within 2 weeks before enrollment) * high-risk stratum: absolute neutrophil count: \>= 1,500/mm\^3 (within 2 weeks before enrollment) * high-risk stratum: platelets: \>= 100,000/mm\^3 (within 2 weeks before enrollment) * high-risk stratum: total bilirubin: \< 2 x upper limit of normal (uln) (within 2 weeks before enrollment) * high-risk stratum: aspartate aminotransferase (ast) (serum glutamic oxaloacetic transaminase \[sgot\]) / alanine aminotransferase (alt) (serum glutamic pyruvic transaminase \[sgpt\]): =\< 2.5 x institutional uln (within 2 weeks before enrollment) * high-risk stratum: albumin \>= 3.0 g/dl (within 2 weeks before enrollment) * high-risk stratum: creatinine levels =\ 50 ml/min (within 2 weeks before enrollment) * high-risk stratum: females of childbearing potential (focbp) must agree to follow contraception requirements: * the effects of nivolumab on the developing human fetus are unknown. for this reason and because other therapeutic agents used in this trial are known to be teratogenic, focbp must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) before study entry, for the duration of study participation and 5 months after completion of nivolumab administration. should a woman become pregnant or suspect she is pregnant while she is participating in this study, she should inform her treating physician immediately * note: a female of childbearing potential is any woman, regardless of sexual orientation or whether they have undergone tubal ligation, who meets the following criteria: 1) has achieved menarche at some point, 2) has not undergone a hysterectomy or bilateral oophorectomy; or 2) has not been naturally postmenopausal (amenorrhea following cancer therapy does not rule out childbearing potential) for at least 24 consecutive months (i.e., has had menses at any time in the preceding 24 consecutive months) * high-risk stratum: participant must have a cd4 count of \>= 100 cells/ul at least 2 weeks prior to enrollment or \>= 100 cells/ul before receiving prior crt, as cd4 may be low due to the effects of crt * high-risk stratum: participant must be on a stable antiretroviral therapy (art) regimen for at least 2 weeks prior to enrollment with no intention to change the regimen within 12 weeks after enrollment * high-risk stratum: participant must have an hiv rna viral load of \< 200 copies/ml * high-risk stratum: participant must have received at least 54 gy of radiation to the ptvp (primary) and 45 gy to ptvn (elective nodal region) for the treatment of the anal cancer within 9 weeks before enrollment * high-risk stratum: participant must have =\< grade 2 diarrhea * participants with grade 1 or grade 2 diarrhea are eligible provided stool for ova/parasites and stool cryptosporidium studies are negative * high-risk stratum: purified protein derivative (ppd) negative. alternatively, the quantiferon-tuberculosis (tb) gold in-tube (qft-git) assay (cellestis limited, carnegie, australia) can be used. an individual is considered positive for m. tuberculosis infection if the interferon (ifn)-gamma response to tb antigens is above the test cut-off (after subtracting the background ifn-gamma response in the negative control). the result must be obtained within 20 weeks prior to enrollment. ppd positive (or quantiferon assay positive) participants are permitted if prophylaxis has been completed prior to enrollment * high-risk stratum: participants with impaired decision-making capacity (idmc) may be eligible for the study provided all other eligibility criteria are satisfied: * the participant's legally authorized representative (lar) is able and willing to sign consent in addition to the study candidate * both participant and lar agree to follow study parameters per protocol * high-risk stratum: the participant, in the opinion of the treating investigator, is able to receive iv contrast injections: * all participants in the high-risk stratum must have an oral contrast (rectal contrast optional) and iv iodine contrast abdomen and pelvis contrast ct (a/p c+ct) and chest c+ct at baseline and for all clinical follow up time points. imaging centers should follow their local routine guidelines for determination of patient eligibility for iv contrast injection and appropriate post contrast follow up renal function determinations * screening eligibility low-risk stratum: participant is able to understand and willing to sign a written informed consent document * screening eligibility low-risk stratum: age \>= 18 years * because no dosing or adverse event data are currently available on the use of low-dose radiation concurrent with mitomycin-c/fluorouracil (5-fu) or mitomycin-c/capecitabine in participants \< 18 years of age, children are excluded from this study * screening eligibility low-risk stratum: participant must have histologically proven t1-2n0m0 invasive anal canal or anal margin squamous cell carcinoma with tumors measuring =\< 4 cm within 6 weeks before pre-registration. measurable disease is not required. participants with tumors of non-keratinizing histology such as basaloid, transitional cell, or cloacogenic histology are permitted. participants who are status/post local excision or excisional biopsy procedure are eligible provided there was tumor involvement of the anal canal and/or anal verge prior to the reaction, if the margins were positive, and/or if the stage is t2n0 based on tumor size before the procedure. this means that participants with t1n0m0 anal margin squamous cell carcinoma who underwent surgical excision with negative margins and no involvement of the anal verge and/or anal canal are not eligible baseline imaging including, fdg-pet/ct and a/p c+ct must be submitted for central review for confirmation of no lymph node involvement. results of central review (including discrepancies between local read and central review) will be returned to the site within 5 business days of submission, allowing participants with imaging suspicious for lymph node (ln) involvement determined by central review to undergo a fine needle aspirate (fna) or core biopsy at their local center confirming no lymph node involvement (n0) for eligibility * screening eligibility low-risk stratum: hiv positive. documentation of hiv-1 infection by means of any one of the following: * documentation of hiv diagnosis in the medical record by a licensed health care provider. if the record contains information that the patient is taking fda-approved combination therapy for hiv infection, then this can be part of the record substantiating the hiv positive diagnosis * hiv-1 rna detection by a licensed hiv-1 rna assay demonstrating \> 1000 rna copies/ml * any licensed hiv screening antibody and/or hiv antibody/antigen combination assay confirmed by a second licensed hiv assay such as a hiv-1 western blot confirmation or hiv rapid multispot antibody differentiation assay. * note: the term "licensed" refers to a kit that has been certified or licensed by an oversight body within the participating country and validated internally (e.g., u.s. fda) * who (world health organization) and cdc (centers for disease control and prevention) guidelines mandate that confirmation of the initial test result must use a test that is different from the one used for the initial assessment. a reactive initial rapid test must be confirmed by either another type of rapid assay or an e/cia that is based on a different antigen preparation and/or different test principle (e.g., indirect versus competitive), or a western blot or a plasma hiv-1 rna viral load * screening eligibility low-risk stratum: tumor size must be documented by digital rectal exam and anoscopy/proctoscopy within 6 weeks prior to pre-registration * screening eligibility low-risk stratum: life expectancy of greater than 6 months * low-risk stratum: participant satisfies all criteria in eligibility for screening low-risk stratum. participants with imaging suspicious for ln involvement determined by central review must undergo a fine needle aspirate (fna) or core biopsy confirming no lymph node involvement (n0) * low-risk stratum: ecog performance status =\ = 50%) * low-risk stratum: hemoglobin \> 10 g/dl (within 2 weeks before enrollment) * low-risk stratum: absolute neutrophil count: \>= 1,500/mm\^3 (within 2 weeks before enrollment) * low-risk stratum: platelets: \>= 100,000/mm\^3 (within 2 weeks before enrollment) * low-risk stratum: total bilirubin: \< 2 x uln (within 2 weeks before enrollment) * low-risk stratum: ast (sgot) / alt (sgpt): =\< 2.5 x institutional uln (within 2 weeks before enrollment) * low-risk stratum: albumin \>= 3.0 g/dl (within 2 weeks before enrollment) * low-risk stratum: serum creatinine levels =\ 50 ml/min (within 2 weeks before enrollment) * low-risk stratum: participant must agree to follow contraception requirements: * females of childbearing potential (focbp) and sexually active males must be strongly advised to use accepted and effective method(s) of contraception or to abstain from sexual intercourse for the duration of their participation in the study and for at least 6 months after the completion of treatment * note: focbp is defined as a sexually mature woman, regardless of sexual orientation or whether they have undergone tubal ligation who: 1) has not undergone a hysterectomy or bilateral oophorectomy; or 2) has not been naturally postmenopausal for at least 24 consecutive months, i.e., has had menses at any time in the preceding 24 consecutive months * low-risk stratum: participant must have a cd4 count of \>= 100 cells/ul at least 2 weeks before enrollment * low-risk stratum: participant must on a stable art regimen for at least 2 weeks before enrollment and receive appropriate care and treatment for hiv infection under the care of a physician experienced in hiv management * low-risk stratum: participant has a hiv rna viral load of \< 200 copies/ml * low-risk stratum: participant has started an alternative anti-coagulant regimen within 2 weeks prior to enrollment if taking warfarin and considering capecitabine * note: low molecular weight heparin is permitted provided the participants prothrombin time (pt)/international normalized ratio (inr) is \< 1.5 * low-risk stratum: participant must agree to having phenytoin levels checked weekly if planning to receive capecitabine while taking phenytoin for a seizure disorder * low-risk stratum: participants with idmc may be eligible for the study provided all other eligibility criteria are satisfied: * the participant's legally authorized representative (lar) is able and willing to sign consent in addition to the study candidate * both participant and lar agree to follow study parameters * low-risk stratum: the participant, in the opinion of the treating investigator, is able to receive iv contrast injections: all participants in the low-risk stratum must have an oral contrast (rectal contrast optional) and iv iodine contrast ct (a/p c+ct and chest c+ct) at baseline and for all clinical follow up time points. imaging centers should follow their local routine guidelines for determination of patient eligibility for iv contrast injection and appropriate post contrast follow up renal function determinations exclusion criteria: * high-risk stratum: any live vaccines within 30 days prior to enrollment * examples of live vaccines include, but are not limited to, the following: measles, mumps, rubella, chicken pox, yellow fever, rabies, bacillus calmette-guerin (bcg), and typhoid (oral) vaccine. seasonal influenza vaccines for injection are generally killed virus vaccines and are allowed; however, intranasal influenza vaccines (e.g., flu-mist) are live attenuated vaccines and are not allowed * note: no live vaccines may be administered while participating in the trial. * high-risk stratum: participant has known interstitial lung disease that is symptomatic or may interfere with the detection or management of suspected drug-related pulmonary toxicity * high-risk stratum: prior treatment with an immune checkpoint inhibitor (anti-pd-1, anti-pd-l1, anti-pd-l2, anti-ctla4 monoclonal antibody) * high-risk stratum: participant with an allogenic bone marrow/stem, cell or solid organ transplant * high-risk stratum: participant is receiving any other investigational agents * high-risk stratum: history of allergic reactions attributed to compounds of similar chemical or biologic composition to nivolumab or other agents used in study * high-risk stratum: uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia or psychiatric illness/social situations that would limit compliance with study requirements * high-risk stratum: participant has a history of a different malignancy, unless he/she have been disease-free for at least 2 years and are deemed by the investigator to be at low risk of recurrence * note: individuals with the following cancers are eligible if diagnosed and treated within the past 5 years: cervical cancer in situ, basal cell or squamous cell carcinoma of the skin, and stage i and iia/iib resected melanoma. in addition, participants on hormonal treatment for breast/gynecological and prostate tumors with no evidence of active disease are permitted, as well as participants with controlled kaposi sarcoma (ks) not requiring systemic ks directed therapy * high-risk stratum: pregnant or breastfeeding. * pregnant women are excluded from this study because nivolumab is an anti-pd-1mab agent with the potential for teratogenic or abortifacient effects. because there is an unknown but potential risk for adverse events in nursing infants secondary to treatment of the mother with nivolumab, breastfeeding should be discontinued if the mother is treated with nivolumab * all focbp must have a blood test or urine study within 2 weeks prior to enrollment to rule out pregnancy * high-risk stratum: participant has not recovered from adverse events due to crt (i.e., have residual toxicity \> grade 1), excluding alopecia * high-risk stratum: participant has had prior potentially curative surgery (i.e., abdominal-perineal resection) for carcinoma of the anus * high-risk stratum: participant is receiving other standard anti-cancer therapy or experimental agent concurrently with the study drugs * high-risk stratum: participant has a known autoimmune disease * participants with active autoimmune disease or history of autoimmune disease that might recur, which may affect vital organ function or require immune suppressive treatment including systemic corticosteroids, should be excluded. these include but are not limited to participants with a history of immune related neurologic disease, multiple sclerosis, autoimmune (demyelinating) neuropathy, guillain-barre syndrome, myasthenia gravis; systemic autoimmune disease such as systemic lupus erythematosus (sle), connective tissue diseases, scleroderma, inflammatory bowel disease (ibd), crohn's, ulcerative colitis, hepatitis; and participants with a history of toxic epidermal necrolysis (ten), stevens-johnson syndrome, or phospholipid syndrome should be excluded because of the risk of recurrence or exacerbation of disease. participants with vitiligo, endocrine deficiencies including thyroiditis managed with replacement hormones including physiologic corticosteroids are eligible. participants with rheumatoid arthritis and other arthropathies, sjogren's syndrome and psoriasis controlled with topical medication and participants with positive serology, such as antinuclear antibodies (ana), anti-thyroid antibodies should be evaluated for the presence of target organ involvement and potential need for systemic treatment but should otherwise be eligible * high-risk stratum: participant requires steroid treatment or other immunosuppressive treatment * participants will be excluded if they have a condition requiring systemic treatment with either corticosteroids (\> 10 mg daily prednisone equivalents) or other immunosuppressive medications within 7 days of study drug administration. topical corticosteroid or occasional inhaled corticosteroids are allowed * high-risk stratum: any surgery must have been completed \>= 4 weeks before treatment initiation * low-risk stratum: has undergone prior potentially curative surgery (i.e., abdominal-perineal resection) for carcinoma of the anus * low-risk stratum: receiving any other standard anti-cancer therapy or investigational agents concurrently with study therapy * low-risk stratum: significant cardiovascular disease including myocardial infarction, unstable angina, stroke, transient ischemic attack, symptomatic coronary artery disease, symptomatic congestive heart failure, or uncontrolled cardiac arrhythmia within 6 months of enrollment * low-risk stratum: history of prior chemotherapy for this malignancy * low-risk stratum: pregnant and/or breast-feeding women * pregnant and/or breast-feeding women are excluded from this study because the study treatment administered