A search for physics beyond the standard model in events with at least three leptons is presented. The data sample, corresponding to an integrated luminosity of 19.5 fb(-1) of proton-proton collisions with center-of-mass energy root s = 8 TeV, was collected by the CMS experiment at the LHC during 2012. The data are divided into exclusive categories based on the number of leptons and their flavor, the presence or absence of an opposite-sign, same-flavor lepton pair (OSSF), the invariant mass of the OSSF pair, the presence or absence of a tagged bottom-quark jet, the number of identified hadronically decaying tau leptons, and the magnitude of the missing transverse energy and of the scalar sum of jet transverse momenta. The numbers of observed events are found to be consistent with the expected numbers from standard model processes, and limits are placed on new-physics scenarios that yield multilepton final states. In particular, scenarios that predict Higgs boson production in the context of supersymmetric decay chains are examined. We also place a 95\% confidence level upper limit of 1.3\% on the branching fraction for the decay of a top quark to a charm quark and a Higgs boson (t -> cH), which translates to a bound on the left-and right-handed top-charm flavor-violating Higgs Yukawa couplings, lambda(H)(tc) and lambda(H)(ct), respectively, of root vertical bar lambda(H)(tc)vertical bar(2)+ vertical bar lambda(H)(tc)vertical bar(2) < 0.21.