  The cross section for W or Z boson production in association with two photons
is measured in proton-proton collisions at a centre-of-mass energy of 13 TeV.
The data set corresponds to an integrated luminosity of 137 fb$^{-1}$ collected
by the CMS experiment at the LHC. The W $\to$ $\ell\nu$ and Z $\to$ $\ell\ell$
decay modes (where $\ell =$ e, $\mu$) are used to extract the W$\gamma\gamma$
and Z$\gamma\gamma$ cross sections in a phase space defined by electron (muon)
with transverse momentum larger than 30 GeV and photon transverse momentum
larger than 20 GeV. All leptons and photons are required to have absolute
pseudorapidity smaller than 2.5. The measured cross sections in this phase
space are $\sigma$(W$\gamma\gamma$) = 13.6 $^{+1.9}_{-1.9}$ (stat)
${}^{+4.0}_{-4.0}$ (syst) $\pm$ 0.08 (PDF + scale) fb and
$\sigma$(Z$\gamma\gamma$) = 5.41 $^{+0.58}_{-0.55}$ (stat) ${}^{+0.64}_{-0.70}$
(syst) $\pm$ 0.06 (PDF + scale) fb. Limits on anomalous quartic gauge couplings
are set in the framework of an effective field theory with dimension-8
operators.
