Is this function necessarily a polynomial?
Consider $f(x) = e^x(x-x_0)^k$.
For $$f(x) = \sin x^3$$ you have $$\begin{align} f(0) & = 0 \\ f'(0) & = 0 \\ f''(0) & = 0 \\ f'''(0) &= \color{red}6 \end{align}$$
With $x=x_0$ for simplicity,
$$ f(x) = e^x - \sum_{n=0}^{k-1} \frac{x^n}{n!} $$
$e^x$ is not special; the same idea works for any $k$-times differentiable function whose $k$-th derivative doesn't vanish.
Works with functions whose $k$-th derivative does vanish too; e.g. add in a $x^k$ term.