Oxidation of sodium thiosulfate by iodine
Whether compound $\ce{X}$ is going to be reduced/oxidized and to what degree is mostly dictated by the corresponding redox potential for the given medium. The thiosulfate anion $\ce{S2O3^2-}$ is used in quantitative analysis and in iodometric titration in particular since it is a reasonably strong reducing agent [1 pp. 714-717]:

$$\ce{S4O6^2- + 2 e- &lt;=&gt; 2 S2O3^2-} \qquad E^\circ = \pu{0.169 V}$$
$$\ce{2 S2O3^2- + I2 -&gt; S4O6^2- + 2 I-}$$

However, stronger oxidants such as chlorine are capable of oxidizing thiosulfate further down to sulfur(VI), e.g. forming a sulfate instead:

$$\ce{S2O3^2- + 4 Cl2 + 5 H2O -&gt; 2 HSO4^- + 8 H+ + 8 Cl-}$$
Bromine, being intermediate between iodine and chlorine, can cause $\ce{S2O3^2-}$ to act either as a 1-electron or an 8-electron reducer
according to conditions. For example, in an amusing and instructive experiment, if concentrated aqueous solutions of $\ce{S2O3^2-}$ and $\ce{Br2}$ are titrated, and the titration is then repeated after having diluted both the $\ce{S2O3^2-}$ and $\ce{Br2}$ solutions 100-fold, then the titre will be found to have increased by a factor of exactly 8.

Note, however, that it is not entirely correct to state that sulfur in thiosulfate has oxidation state $+2$. In fact, there are two nonequivalent $\ce{S}$ atoms with oxidation states -1 and +5. Same goes for tetrathionate anion $\ce{S4O6^2−}$ where two central $\ce{S}$ atoms have oxidation state $0$ and the two terminal ones $+5$.
References

Greenwood, N. N.; Earnshaw, A. Chemistry of the Elements, 2nd ed.; Butterworth-Heinemann: Oxford; Boston, 1997. ISBN 978-0-7506-3365-9.