Are these pigtails inside the panel and outside a junction box allowed?
Pigtails in a panel are fine...

Wire-splicing and pigtailing within a loadcenter cabinet (panel enclosure) is expressly permitted by NEC 312.8(A), and is quite safe (provided the splices are made up properly, of course):


  (A) Splices, Taps, and Feed-Through Conductors. The wiring
  space of enclosures for switches or overcurrent devices shall be
  permitted for conductors feeding through, spliced, or tapping
  off to other enclosures, switches, or overcurrent devices where
  all of the following conditions are met:
  
  (1) The total of all conductors installed at any cross section of
  the wiring space does not exceed 40 percent of the cross-
  sectional area of that space.
  
  (2) The total area of all conductors, splices, and taps installed
  at any cross section of the wiring space does not exceed
  75 percent of the cross-sectional area of that space.
  
  (3) A warning label complying with 110.21(B) is applied to
  the enclosure that identifies the closest disconnecting
  means for any feed-through conductors.


...but that unenclosed splice job sure isn't!

However, that unenclosed splicing job is a big problem, and a clear violation of NEC 300.15 (none of 300.15(A)-300.15(L) permit anything remotely resembling a flop-a-dop splice job out in the open like this):


  300.15 Boxes, Conduit Bodies, or Fittings — Where Required.
  
  A box shall be installed at each outlet and switch point for
  concealed knob-and-tube wiring.
  
  Fittings and connectors shall be used only with the specific
  wiring methods for which they are designed and listed.
  
  Where the wiring method is conduit, tubing, Type AC cable,
  Type MC cable, Type MI cable, nonmetallic-sheathed cable, or
  other cables, a box or conduit body shall be installed at each
  conductor splice point, outlet point, switch point, junction
  point, termination point, or pull point, unless otherwise
  permitted in 300.15(A) through (L).


Also, that splice needs help anyway

Furthermore, that flop-a-dop splice contains some rather overstuffed wire nuts (7-8 wires into a nut that can only take 6), as well as missing or unhooked ground wires.  That should be easy for whoever fixes it to fix, since they'll have to take the whole thing apart to get it boxed in any case, though.