[Tue Mar 16 10:44:05.479647 2023] [rewrite:error] [client 55.66.77.88:65176] AH10410: Rewritten query string contains control characters or spaces
Author: covener
Date: Sun Mar 5 20:28:43 2023 UTC
Changed paths: 7
Log Message:
Merge r1908095 from trunk:
don't forward invalid query strings
Submitted by: rpluem
Reviewed By: covener, fielding, rpluem, gbechis
modules/mappers/mod_rewrite.c
@@ -4729,6 +4729,17 @@ static int hook_uri2file(request_rec *r)
unsigned skip;
apr_size_t flen;
+ if (r->args && *(ap_scan_vchar_obstext(r->args))) {
+ /*
+ * We have a raw control character or a ' ' in r->args.
+ * Correct encoding was missed.
+ */
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10410)
+ "Rewritten query string contains control "
+ "characters or spaces");
+ return HTTP_FORBIDDEN;
+ }
if (ACTION_STATUS == rulestatus) {
int n = r->status;
# ❌ BEFORE (though it is 100% OK before 2023 Feb or Jan ...)
RewriteRule ^/product/(.*)/([0-9]*)$ /control/show_product.php?prod=$1&p=$2 [QSA]
# ✅ AFTER: Add a [B] flag in the rear of your rewrite rule, usually before [QSA]
RewriteRule ^/product/(.*)/([0-9]*)$ /control/show_product.php?prod=$1&p=$2 [B,QSA]
USN-5942-1: Apache HTTP Server vulnerabilities
9 March 2023
Several security issues were fixed in Apache HTTP Server.
Releases
Ubuntu 22.10 Ubuntu 22.04 LTS Ubuntu 20.04 LTS Ubuntu 18.04 LTS
Packages
apache2 - Apache HTTP seraver
Details
Lars Krapf discovered that the Apache HTTP Server mod_proxy module
incorrectly handled certain configurations. A remote attacker could
possibly use this issue to perform an HTTP Request Smuggling attack.
(CVE-2023-25690)
Dimas Fariski Setyawan Putra discovered that the Apache HTTP Server
mod_proxy_uwsgi module incorrectly handled certain special characters. A
remote attacker could possibly use this issue to perform an HTTP Request
Smuggling attack. This issue only affected Ubuntu 20.04 LTS, Ubuntu 22.0
Ubuntu 22.10
apache2 - 2.4.54-2ubuntu1.2
Ubuntu 22.04
apache2 - 2.4.52-1ubuntu4.4
Ubuntu 20.04
apache2 - 2.4.41-4ubuntu3.14
Ubuntu 18.04
apache2 - 2.4.29-1ubuntu4.27
引言回覆: |
The [B] flag instructs RewriteRule to escape non-alphanumeric characters before applying the transformation. |