Measurements of magnetotransport and current-voltage (I-V) characteristics up to 9 T were used to investigate the vortex phase diagram of an underdoped (Ba,K)Fe2As2 single crystal with T-c=26.2 K. It is found that the anisotropy ratio of the upper critical field H-c2 decreases from 4 to 2.8 with decreasing temperature from T-c to 24.8 K. Consistent with the vortex-glass theory, the I-V curves measured at H=9 T can be well scaled with the vortex-glass transition temperature of T-g=20.7 K and critical exponents z=4.1 and nu=1. Analyses in different magnetic fields produced almost identical critical exponent values, with some variation in T-g, corroborating the existence of the vortex-glass transition in this underdoped (Ba,K)Fe2As2 single crystal up to 9 T. A vortex phase diagram is presented, based on the evolution of T-g and H-c2 with magnetic field.