You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "React v16.4.2: Correção de vulnerabilidade no lado do servidor"
3
3
author: [gaearon]
4
4
---
5
5
6
-
We discovered a minor vulnerability that might affect some apps using ReactDOMServer. We are releasing a patch version for every affected React minor release so that you can upgrade with no friction. Read on for more details.
6
+
Nós descobrimos uma pequena vulnerabilidade que pode afetar alguns aplicativos usando ReactDOMServer. Nós estamos lançando uma versão de correção para cada release minor afetado do React para que você possa atualizar sem conflito. Leia para mais detalhes.
7
7
8
-
## Short Description {#short-description}
8
+
## Pequena Descrição {#short-description}
9
9
10
-
Today, we are releasing a fix for a vulnerability we discovered in the `react-dom/server` implementation. It was introduced with the version 16.0.0 and has existed in all subsequent releases until today.
10
+
Hoje, nós estamos lançando uma correção para uma vulnerablidade que encontramos na implementação do `react-dom/server`. Foi introduzido com a versão 16.0.0 e existiu em todas as versões subsequentes até hoje.
11
11
12
-
This vulnerability**can only affect some server-rendered React apps.**Purely client-rendered apps are **not**affected. Additionally, we expect that most server-rendered apps don't contain the vulnerable pattern described below. Nevertheless, we recommend to follow the mitigation instructions at the earliest opportunity.
12
+
Essa vulnerabilidade**só pode afetar alguns aplicativos React renderizados no lado do servidor.**Puramente, aplicativos renderizados no lado cliente **não**são afetados. Adicionalmente, nós esperamos que a maioria dos aplicativos renderizados no lado servidor não contêm o padrão vulnerável descrito abaixo. No entanto, recomendamos seguir as instruções de mitigação assim que possível.
13
13
14
-
While we were investigating this vulnerability, we found similar vulnerabilities in a few other popular front-end libraries. We have coordinated this release together with[Vue](https://github.com/vuejs/vue/releases/tag/v2.5.17)and[Preact](https://github.com/developit/preact-render-to-string/releases/tag/3.7.1) releases fixing the same issue. The tracking number for this vulnerability is`CVE-2018-6341`.
14
+
Enquanto estávamos investigando essa vulnerabilidade, nós encontramos vulnerabilidades semelhantes em algumas outras populares bibliotecas de front-end. Nós coordenamos esta release junto com[Vue](https://github.com/vuejs/vue/releases/tag/v2.5.17)e[Preact](https://github.com/developit/preact-render-to-string/releases/tag/3.7.1) releases, arrumando o mesmo problema. O número de rastreamento para esta vulnerabilidade é`CVE-2018-6341`.
15
15
16
-
## Mitigation {#mitigation}
16
+
## Mitigação {#mitigation}
17
17
18
-
**We have prepared a patch release with a fix for every affected minor version.**
18
+
**Preparamos uma pacote de correção, com uma correção para cada versão secundária afetada.**
19
19
20
20
### 16.0.x {#160x}
21
21
22
-
If you're using `react-dom/server`with this version:
22
+
Se você estiver utilizando `react-dom/server`com esta versão:
If you're using a newer version of `react-dom`, no action is required.
74
+
Se você estiver usando a versão mais recente do `react-dom`, nenhuma ação é necessária.
75
75
76
-
Note that only the `react-dom`package needs to be updated.
76
+
Repare que apenas o pacote `react-dom`precisa ser atualizado.
77
77
78
-
## Detailed Description {#detailed-description}
78
+
## Descrição Detalhada {#detailed-description}
79
79
80
-
Your app might be affected by this vulnerability only if both of these two conditions are true:
80
+
O seu aplicativo apenas pode ser afetado por essa vulnerabilidade, se essas duas condições forem verdadeiras:
81
81
82
-
*Your app is **being rendered to HTML using[ReactDOMServer API](/docs/react-dom-server.html)**, and
83
-
*Your app**includes a user-supplied attribute name in an HTML tag.**
82
+
*Seu aplicativo **está renderizando HTML usando[ReactDOMServer API](/docs/react-dom-server.html)**, e
83
+
*Seu aplicativo**inclui um nome de atributo fornecido pelo usuário em uma tag HTML.**
84
84
85
-
Specifically, the vulnerable pattern looks like this:
85
+
Especificamente, o padrão vulnerável se parece com isso:
86
86
87
87
```js{2}
88
88
let props = {};
@@ -91,58 +91,58 @@ let element = <div {...props} />;
91
91
let html = ReactDOMServer.renderToString(element);
92
92
```
93
93
94
-
In order to exploit it, the attacker would need to craft a special attribute name that triggers an[XSS](https://en.wikipedia.org/wiki/Cross-site_scripting) vulnerability. For example:
94
+
Para explorá-lo, o invasor precisaria criar um nome de atributo especial que acionasse uma vulnerabilidade[XSS](https://en.wikipedia.org/wiki/Cross-site_scripting). Por exemplo:
95
95
96
96
```js
97
97
let userProvidedData ='></div><script>alert("hi")</script>';
98
98
```
99
99
100
-
In the vulnerable versions of `react-dom/server`, the output would let the attacker inject arbitrary markup:
100
+
Nas versões vulneráveis de `react-dom/server`, a saída deixaria o atacante injetar marcação arbitrária:
101
101
102
102
```html
103
103
<div ></div><script>alert("hi")</script>
104
104
```
105
105
106
-
In the versions after the vulnerability was [fixed](https://github.com/facebook/react/pull/13302) (and before it was introduced), attributes with invalid names are skipped:
106
+
Nas versões após, a vulnerabilidade foi [ajustada](https://github.com/facebook/react/pull/13302) (e antes de ser introduzido), atributos com nomes inválidos são ignorados:
107
107
108
108
```html
109
109
<div></div>
110
110
```
111
111
112
-
You would also see a warning about an invalid attribute name.
112
+
Você também veria um aviso sobre um nome de atributo inválido.
113
113
114
-
Note that**we expect attribute names based on user input to be very rare in practice.**It doesn't serve any common practical use case, and has other potential security implications that React can't guard against.
114
+
Observe que**esperamos que os nomes de atributos baseados na entrada do usuário sejam muito raros na prática.**Ele não serve a nenhum caso de uso prático comum e tem outras possíveis implicações de segurança que o React não pode proteger contra.
Refer to the documentation for [detailed installation instructions](/docs/installation.html).
139
+
Consulte a documentação para [instruções detalhadas de instalação](/docs/installation.html).
140
140
141
141
## Changelog {#changelog}
142
142
143
143
### React DOM Server {#react-dom-server}
144
144
145
-
*Fix a potential XSS vulnerability when the attacker controls an attribute name (`CVE-2018-6341`). This fix is available in the latest`[email protected]`, as well as in previous affected minor versions: `[email protected]`, `[email protected]`, `[email protected]`, and`[email protected]`. ([@gaearon](https://github.com/gaearon)in[#13302](https://github.com/facebook/react/pull/13302))
145
+
*Corrige uma potencial vulnerabilidade de XSS quando o invasor controla um nome de atributo (`CVE-2018-6341`). Esta correção está disponível no mais recente`[email protected]`, bem como nas versões secundárias afetadas anteriores: `[email protected]`, `[email protected]`, `[email protected]`, e`[email protected]`. ([@gaearon](https://github.com/gaearon)em[#13302](https://github.com/facebook/react/pull/13302))
146
146
147
-
*Fix a crash in the server renderer when an attribute is called`hasOwnProperty`. This fix is only available in`[email protected]`. ([@gaearon](https://github.com/gaearon)in[#13303](https://github.com/facebook/react/pull/13303))
147
+
*Corrige uma falha no renderizador do servidor quando um atributo é chamado`hasOwnProperty`. Essa correção só está disponível em`[email protected]`. ([@gaearon](https://github.com/gaearon)em[#13303](https://github.com/facebook/react/pull/13303))
0 commit comments