Following Theo Johnson-Freyd's comments, I found:
Let $E \to B$ be a vector bundle and $\nabla$ be a connection. Let $x_0 \in B$ and, for every $x \in B$, let $\gamma_x : [0,1] \to B$ be a path from $x$ to $x_0$. A candidate for a global trivialization is $$\Phi : \left\{ \begin{array}{ccc} E & \to & B \times E_{x_0} \\ (x,v) & \mapsto & (x,\tau_x(v)) \end{array} \right.$$ where $\tau_x$ is the parallel transport along $\gamma_x$. The only obstruction so that $\Phi$ be a global trivialization is that $(x,v) \mapsto \tau_x(v)$ can be non-smooth.
In fact, $\tau_x(v)=\tilde{\gamma}_x(1)$ where $\tilde{\gamma}_x : [0,1] \to E$ is a parallel path (along $\gamma_x$) satisfying $\tilde{\gamma}_x(0)=(x,v)$, that is $\tilde{\gamma}_x$ is solution to $$\left\{ \begin{array}{l} \nabla_{\dot{\gamma}_x} \dot{\tilde{\gamma}}_x=0 \\ \tilde{\gamma}_x(0)=(x,v) \end{array} \right..$$
If locally $(X_1, \dots, X_r)$ is a basis of $E$, $\dot{\gamma}_x=a^i\partial_i$ and $\dot{\tilde{\gamma}}_x=b^iX_i$, the equation above can be written as $$(b^i)'X_i+b^ia^j \nabla_{\partial_j}X_i=0.$$
It is a linear ODE in $b^i$, and we now that the solution is smooth if the coefficients so are.
Therefore, if the path $\gamma_x$ depends smoothly on $x$ (in the sense that the $a^i$ are smooth), then $\Phi$ is a global trivialization. For the closed ball $B(0,1) \subset \mathbb{R}^n$, we may choose $x_0=0$ and $\gamma_x(t)=(1-t)x$ so that $\tilde{\gamma}_x=-x$; thus, any vector bundle over $[0,1]^n$ is trivial.