Zum Hauptinhalt springen
LIVE
CVSS 7.4CVE-2026-138376 | AsyncSSH 1.13.1 before 2.24.2 contains an improper authentication vulnerability in SSHConnection._match_known_hosts that accumulates trusted client host keys across host-based authentication attempts on one connection. With trust_client_host enabled, attackers holding one known client host's private key can retry naming another known host and log in as users authorized only from that host.CVSS 7.6CVE-2026-138377 | AsyncSSH 1.13.1 before 2.24.2 contains an improper certificate validation vulnerability that allows remote clients to authenticate as users by abusing X.509 certificates matched in known_client_hosts. Attackers can make a failed host-based authentication attempt with any host key, adding host-only CA certificates to the trust anchors, then authenticate using user certificates issued under those CAs.CVSS 9.1CVE-2026-138378 | react-native-pure-jwt before 3.1.1 on Android contains a signature verification bypass vulnerability that allows unauthenticated attackers to forge tokens because RNPureJwtModule decode() calls JJWT parse() without algorithm pinning. Attackers can craft a token with header alg none and an empty signature to have arbitrary claims accepted as verified, forging identities or roles.CVSS 6.9CVE-2026-138379 | flare-redact before 1.13.1 contains a redaction bypass vulnerability that leaks secrets because the redact() object walker masks sensitive keys only when values are strings. Numbers, objects, arrays and binary data under keys such as password, cvv, pin, cookie or authorization pass through unchanged, exposing secrets in clear text to logger, Sentry, gateway and Fluent Bit sinks.CVSS 6.9CVE-2026-138380 | MediaInfoLib before 26.10 contains a heap-based buffer over-read vulnerability in File_Ogg::Data_Parse() that allows attackers to read beyond heap buffers via crafted Ogg segment sizes. Attackers can supply an Ogg file whose segment sizes exceed the page payload, wrapping the unsigned offset check and causing memcpy over-reads that crash the process or leak heap memory.CVSS 6.9CVE-2026-138381 | GNU LibreDWG 0.14 before 0.15 contains a heap use-after-free vulnerability in in_dxf.c new_object() where the OLE2FRAME oleclient pointer references freed memory after DXF import. Attackers can supply a DXF file with an OLE2FRAME entity to crash dxfwrite or similar applications and leak freed heap contents into exported output.CVSS 10.0CVE-2026-138227 | A vulnerability was found in D-Link R95 1.04B04Beta. This affects the function SetTimeSettings of the file /bin/ssi of the component DHMAPI. Performing a manipulation of the argument TZLocation results in os command injection. Remote exploitation of the attack is possible. The exploit has been made public and could be used.CVSS 10.0CVE-2026-138226 | A vulnerability has been found in D-Link R95 1.04B04Beta. Affected by this issue is the function SetSecureDNSSettings of the file /bin/ssi of the component DHMAPI SOAP interface. Such manipulation of the argument URI leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

S3 Static Hosting with HTTP-Errors Redirects — Solved

If you have ever deployed a Single Page Application (SPA) or a static site using Amazon S3, you might have encountered a frustratingly common issue: refresh…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 5 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung

If you have ever deployed a Single Page Application (SPA) or a static site using Amazon S3, you might have encountered a frustratingly common issue: refresh errors. You navigate to yoursite.com/about, and everything works perfectly. But the moment you hit the refresh button—or share that link with a friend—you are greeted with a glaring 403 Forbidden or 404 Not Found error.



This is one of the most infamous pitfalls of static hosting. Here is why it happens and the definitive way to fix it.



The Root Cause

S3 is an object storage service, not a web server.



When you upload a React or Vue app, you usually have a single index.html that acts as your application shell. Your app uses client-side routing (like React Router) to handle navigation. However, S3 does not know about your routing logic. When you request /about, S3 looks for a literal file named about in the root directory. Since that file does not exist, S3 returns a 404 error.



To solve this, you need to instruct S3 to serve index.html for all requests, regardless of the path. This is usually done via the "Static website hosting" settings.



The "Old" Solution: S3 Redirection Rules

The standard advice is to use the S3 "Static website hosting" feature and set the "Error document" to index.html. This creates a redirection rule.



While this works, it has a significant downside: HTTP status codes.



When S3 returns index.html for a missing page, it often sends a 200 OK status. This is fine for the user interface, but it is a nightmare for SEO. Search engines cannot distinguish between a valid page and a missing page, and analytics tools fail to track 404s correctly.



The "Solved" Solution: CloudFront and Custom Error Responses

The most robust and professional solution involves CloudFront, AWS's Content Delivery Network (CDN). Instead of relying on S3's redirection, we use CloudFront's custom error responses to serve the index.html file while preserving the correct HTTP status.



Step-by-Step Implementation

Step 1: Set up the S3 Bucket

Upload your static files. Ensure the bucket is configured for static website hosting (or use the newer S3 website endpoint). For CloudFront, it is often better to use the REST endpoint to avoid redirect issues.



Step 2: Configure CloudFront Behavior

In your CloudFront distribution settings, find the "Error Pages" section.



Step 3: Create a Custom Error Response

You need to configure rules for specific HTTP error codes. Add a rule for both 403: Forbidden and 404: Not Found.



For each error, set the following:



Customize Error Response: Yes



Response Page Path: /index.html (or the root of your app)



HTTP Response Code: Set this to 200 only if you want to hide the error. However, the best practice for SEO is to set this to 404 if it is a real missing page, or leave it as 200 if you are using a SPA router.



The SPA Trick: For SPAs, you usually want the error response to be 200 (so the app loads and the router takes over). But, if you want to be precise, you can implement server-side logic to determine if the file exists. For most SPAs, the 200 override is the accepted standard.



The "S3 Redirects" Caveat

If you were using the S3 static website hosting endpoint (with s3-website-region.amazonaws.com), you might have been using RoutingRules to handle redirects. This approach has been largely superseded by CloudFront because:



HTTPS: S3 website endpoints do not support HTTPS natively. You must use CloudFront for SSL certificates.



Speed: CloudFront serves content from edge locations, drastically reducing latency.



Granularity: CloudFront allows you to handle errors without changing the URL in the browser, whereas S3 redirects often perform an explicit redirect (changing the URL).



The Ultimate Configuration

If you are using CloudFront + S3, your configuration should look like this:



S3: Just store the files. Do not rely on the "Static website hosting" redirection feature. Use the bucket's REST endpoint (not the website endpoint).



CloudFront Origin: Point to the S3 bucket REST endpoint.



Error Pages:



Error Code: 403



Response Page Path: /index.html



HTTP Response Code: 200



Error Code: 404



Response Page Path: /index.html



HTTP Response Code: 200



A Note on http-errors and Nginx

Sometimes, developers use the http-errors middleware in Node.js or Nginx configurations to serve the index.html file. The logic is identical: you are creating a "catch-all" route.



If you are using a reverse proxy like Nginx in front of your S3 bucket (via a proxy pass), the equivalent configuration is:



text

try_files $uri $uri/ /index.html;

This tells the server to check if the file exists ($uri), and if not, fall back to index.html.



Why This is "Solved"

By using this CloudFront-first approach, you get:



Perfect SPA Routing: Deep links and refreshes work flawlessly.



Global Speed: Edge caching.



Security: Full HTTPS support.



SEO Friendliness: You control exactly which status codes are returned.



So, ditch the S3 static hosting redirect rules and embrace CloudFront. It is the standard, production-grade method for hosting modern web applications on AWS.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Community Rating & Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
25 Quellen
CVE-2026-135550 | Mozilla Firefox Web Codecs memory corruption (Nessus ID 388625)
VulDB Updates vor 1 Std.
24 weitere Quellen
VulDB Updatesvor 1 Std.CVE-2026-135551 | Mozilla Firefox up to 153.7/160 Layout use after free (Nessus ID 388625) VulDB Updatesvor 1 Std.CVE-2026-135552 | Mozilla Firefox up to 115.45/153.7/160 Canvas2D use after free (Nessus ID 388625) VulDB Updatesvor 1 Std.CVE-2026-135554 | Mozilla Firefox up to 115.45/153.7/160 Navigation use after free (Nessus ID 388625) VulDB Updatesvor 1 Std.CVE-2026-135556 | Mozilla Firefox up to 115.45/153.7/160 JIT memory corruption (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135540 | Mozilla Firefox up to 115.45/153.7/160 JIT memory corruption (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135539 | Mozilla Firefox up to 115.45/153.7/160 CSS Object Model use after free (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135542 | Mozilla Firefox up to 115.45/153.7/160 Layout buffer overflow (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135541 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135544 | Mozilla Firefox up to 115.45/153.7/160 Navigation memory corruption (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135545 | Mozilla Firefox up to 153.7/160 Editor memory corruption (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135543 | Mozilla Firefox up to 115.45/153.7/160 Networking memory corruption (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135547 | Mozilla Firefox up to 115.45/153.7/160 Networking sandbox (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135549 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135548 | Mozilla Firefox up to 115.45/153.7/160 Layout use after free (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135533 | Mozilla Firefox up to 115.45/153.7/160 Layout Tables off-by-one (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135536 | Mozilla Firefox up to 115.45/153.7/160 DOM Editor uninitialized pointer (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135535 | Mozilla Firefox up to 115.45/153.7/160 Skia input validation (Nessus ID 388625) VulDB Updatesvor 4 Std.CVE-2026-135537 | Mozilla Firefox up to 115.45/153.7/160 Layout Text/Fonts out-of-bounds (Nessus ID 388625) VulDB Updatesvor 5 Std.CVE-2026-135525 | Mozilla Firefox up to 115.45/153.7/160 WebRender use after free (Nessus ID 388625) VulDB Updatesvor 5 Std.CVE-2026-135526 | Mozilla Firefox up to 115.45/153.7/160 Networking use after free (Nessus ID 388625) VulDB Updatesvor 5 Std.CVE-2026-135527 | Mozilla Firefox up to 115.45/153.7/160 DOM/HTML use after free (Nessus ID 388625) VulDB Updatesvor 5 Std.CVE-2026-135528 | Mozilla Firefox up to 153.7/160 HTTP race condition (Nessus ID 388625) VulDB Updatesvor 5 Std.CVE-2026-135530 | Mozilla Firefox up to 115.45/153.7/160 HTTP sandbox (Nessus ID 388625) VulDB Updatesvor 5 Std.CVE-2026-135529 | Mozilla Firefox up to 153.7/160 Text sandbox (Nessus ID 388625)
17 Quellen
Apple Cyber Monday Deals (2026): AirPods, iPads, MacBooks, and More
WIRED vor 22 Min.
16 weitere Quellen
The Mac Observervor 30 Min.Aqara W200 thermostat is $119.99 for Cyber Monday, $40 off and Apple Home ready Latest from TechRadarvor 49 Min.Cyber Monday mini PC deals 2026 live — top tiny desktops from GMKtec, Geekom, Minisforum, and more as the Black Friday sale continues The Mac Observervor 55 Min.Sonos Beam Gen 2 is $339 for Cyber Monday, $160 off and $359 under two HomePods The Mac Observervor 1 Std.Magic Mouse in black drops to $79.99 for Cyber Monday, $19 under Apple’s $99 The Mac Observervor 1 Std.Garmin fenix 8 47mm drops $250 to $749.99 for Cyber Monday, $49 under Ultra 4 Latest from TechRadarvor 2 Std.I've been waiting for a better deal on the Philips LatteGo 4400 — and Amazon has delivered a record-low price for Cyber Monday Latest from TechRadarvor 2 Std.Looking to get a last-minute gaming gift before Cyber Monday is over? WIREDvor 3 Std.Last Call for Black Friday iPad Deals (2026): Save Up to $100 Latest from Windows Centralvor 3 Std.Why I bought a handheld over a gaming laptop on Cyber Monday Latest from TechRadarvor 3 Std.I found the most capable PC under $300 for Cyber Monday — Origimagic's C7 Windows 11 Pro machine packs dual Thunderbolt 4, 2.5Gb LAN, a Core 3 100U, 16GB of RAM, and a 512GB SSD OS X Dailyvor 3 Std.Cyber Monday Deals: $300 Off 16″ PROLED MacBook Pro, $100 Off AirPods Pro 3, $100 Off iPad Air, & More Latest from TechRadarvor 4 Std.Cyber Monday home office deals 2026 live — our top workspace picks from FlexiSpot, Dell, Anker, Logitech and more as Black Friday sale rolls on Latest from TechRadarvor 4 Std.The best Cyber Monday deals in the UK in 2026: top picks from Amazon, Argos, Ninja, Lego and more Latest from TechRadarvor 4 Std.Black Friday laptop deals 2026: the huge savings on MacBooks, Chromebooks and Windows 11 laptops still available from Apple, Dell, HP and many more Latest from TechRadarvor 4 Std.Cyber Monday Australia laptop deals for 2026: score up to 52% off Lenovo, Apple, Dell, HP and more Latest from TechRadarvor 4 Std.Amazon Australia Cyber Monday deals
12 Quellen
CVE-2026-116159 | ImageMagick up to 6.9.13-57/7.1.2-32 CDL Option memory leak (Nessus ID 388637)
VulDB Updates vor 1 Std.
11 weitere Quellen
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten S3 Static Hosting with HTTP-Errors Redirects — Solved

Thematisch verwandte Begriffe: Static, Hosting, with, HTTPErrors · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag